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

Commit 402c5d0b authored by George Lu's avatar George Lu Committed by Chris Manton
Browse files

Restore HeadsetClientStateMachine.getCurrentAgFeatures() reporting of...

Restore HeadsetClientStateMachine.getCurrentAgFeatures() reporting of EXTRA_AG_FEATURE_VOICE_RECOGNITION.

Reporting appears to have been disabled during a refactor on 2017-01-20 in commit 84f977c6. Other functionality has since been restored (e.g. HeadsetClientService.startVoiceRecognition()), so this omission appears to be an oversight.

Bug: 75962618
Test: make, atest BluetoothInstrumentationTests, local verification with Pixel 2
Change-Id: I96441cb31c15574df1282a8f87546e821b5a1566
parent a60d454f
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -658,6 +658,10 @@ public class HeadsetClientStateMachine extends StateMachine {
                == HeadsetClientHalConstants.PEER_FEAT_3WAY) {
            b.putBoolean(BluetoothHeadsetClient.EXTRA_AG_FEATURE_3WAY_CALLING, true);
        }
        if ((mPeerFeatures & HeadsetClientHalConstants.PEER_FEAT_VREC)
                == HeadsetClientHalConstants.PEER_FEAT_VREC) {
            b.putBoolean(BluetoothHeadsetClient.EXTRA_AG_FEATURE_VOICE_RECOGNITION, true);
        }
        if ((mPeerFeatures & HeadsetClientHalConstants.PEER_FEAT_REJECT)
                == HeadsetClientHalConstants.PEER_FEAT_REJECT) {
            b.putBoolean(BluetoothHeadsetClient.EXTRA_AG_FEATURE_REJECT_CALL, true);
@@ -1782,6 +1786,10 @@ public class HeadsetClientStateMachine extends StateMachine {
                    == HeadsetClientHalConstants.PEER_FEAT_3WAY) {
                intent.putExtra(BluetoothHeadsetClient.EXTRA_AG_FEATURE_3WAY_CALLING, true);
            }
            if ((mPeerFeatures & HeadsetClientHalConstants.PEER_FEAT_VREC)
                    == HeadsetClientHalConstants.PEER_FEAT_VREC) {
                intent.putExtra(BluetoothHeadsetClient.EXTRA_AG_FEATURE_VOICE_RECOGNITION, true);
            }
            if ((mPeerFeatures & HeadsetClientHalConstants.PEER_FEAT_REJECT)
                    == HeadsetClientHalConstants.PEER_FEAT_REJECT) {
                intent.putExtra(BluetoothHeadsetClient.EXTRA_AG_FEATURE_REJECT_CALL, true);