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

Commit cb9958d5 authored by Chienyuan's avatar Chienyuan Committed by Jack He
Browse files

HFP: Only reset AG indicator listeners when HF is first connected

* Only reset AG indicator listener state in HeadsetStateMachine
  when entering Connected state from Connecting state

Bug: 80408316
Test: Connect a headset that does not need RSSI, make a phone call,
      hangup and check AG indicator listener states
Change-Id: I6422102fab1e12c412890aae84ac471237817ff4
parent f3768d4d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1014,8 +1014,9 @@ public class HeadsetStateMachine extends StateMachine {
            if (mConnectingTimestampMs == Long.MIN_VALUE) {
                mConnectingTimestampMs = SystemClock.uptimeMillis();
            }
            updateAgIndicatorEnableState(DEFAULT_AG_INDICATOR_ENABLE_STATE);
            if (mPrevState == mConnecting) {
                // Reset AG indicator subscriptions, HF can set this later using AT+BIA command
                updateAgIndicatorEnableState(DEFAULT_AG_INDICATOR_ENABLE_STATE);
                // Reset NREC on connect event. Headset will override later
                processNoiseReductionEvent(true);
                // Query phone state for initial setup