Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59e81130 authored by Sal Savage's avatar Sal Savage
Browse files

Fix NPE in MceStateMachine when getState() is called during shut down

Bug: b/131162690
Test: Manual build test on internal
Change-Id: I7a1cb619dc1bf04957208751d7de350e888b6335
parent bb81ed59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -184,7 +184,7 @@ final class MceStateMachine extends StateMachine {

    public synchronized int getState() {
        IState currentState = this.getCurrentState();
        if (currentState.getClass() == Disconnected.class) {
        if (currentState == null || currentState.getClass() == Disconnected.class) {
            return BluetoothProfile.STATE_DISCONNECTED;
        }
        if (currentState.getClass() == Connected.class) {