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

Commit 054c281d authored by Jack He's avatar Jack He
Browse files

HFP-Client: Set current device to null after firing broadcast

* Otherwise, the device in the broadcast will be null

Bug: 68722902
Test: runtest bluetooth
Change-Id: Ie3c97b46c3188376eea562252cbb6a84f71cb4f5
parent ed6d6854
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -786,9 +786,6 @@ public class HeadsetClientStateMachine extends StateMachine {
            mQueuedActions = new LinkedList<Pair<Integer, Object>>();
            clearPendingAction();


            mCurrentDevice = null;

            mCalls.clear();
            mCallsUpdate.clear();

@@ -807,6 +804,7 @@ public class HeadsetClientStateMachine extends StateMachine {
                Log.e(TAG, "Connected: Illegal state transition from " + mPrevState.getName()
                        + " to Connecting, mCurrentDevice=" + mCurrentDevice);
            }
            mCurrentDevice = null;
        }

        @Override