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

Commit f96269ab authored by rago's avatar rago
Browse files

Enabling HW detection while phone ringing

Updated logic to allow HotWord detection while phone is ringing (still
not off-hook).

Test: Manual Testing
Bug: 124762676
Change-Id: Idce6d39a5589aee6d5baa4e5bcd8d98b3e13b239
parent f376daf6
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);