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

Commit 193aeda2 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Enabling HW detection while phone ringing"

parents 493080e8 f96269ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -889,7 +889,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
        public void onCallStateChanged(int state, String arg1) {
            if (DBG) Slog.d(TAG, "onCallStateChanged: " + state);
            synchronized (mLock) {
                onCallStateChangedLocked(TelephonyManager.CALL_STATE_IDLE != state);
                onCallStateChangedLocked(TelephonyManager.CALL_STATE_OFFHOOK == state);
            }
        }
    }
@@ -924,7 +924,7 @@ public class SoundTriggerHelper implements SoundTrigger.StatusListener {
        long token = Binder.clearCallingIdentity();
        try {
            // Get the current call state synchronously for the first recognition.
            mCallActive = mTelephonyManager.getCallState() != TelephonyManager.CALL_STATE_IDLE;
            mCallActive = mTelephonyManager.getCallState() == TelephonyManager.CALL_STATE_OFFHOOK;

            // Register for call state changes when the first call to start recognition occurs.
            mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE);