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

Commit c252d1c0 authored by Srini S's avatar Srini S
Browse files

Add ACTION_STOP_VOICE_COMMAND intent

Add ACTION_STOP_VOICE_COMMAND intent to stop Voice Assistant
session over Bluetooth.
This intent will be broadcasted from Bluetooth Service to
inform Assistant apps to stop Voice Assistant session.

Following extras would be part of this intent:
a. EXTRA_DEVICE indicates the BluetoothDevice which initiated this
request.
b. EXTRA_PROFILE indicates the profile (BluetoothProfile#HEADSET
or BluetoothProfile#LE_AUDIO) which triggered this request.

Assistant apps would use this new intent to end the Voice
Assistant session over Bluetooth.

If the EXTRA_PROFILE is BluetoothProfile#HEADSET, the assistant app should call BluetoothHeadset#stopVoiceRecognition to stop voice assistant session.
If the EXTRA_PROFILE is BluetoothProfile#LE_AUDIO, the app should call AudioRecord#stop() to stop voice assistant session.

Test: atest PairingTest
Flag: android.content.flags.stop_voice_command
Bug: 419049796

Change-Id: I6fb7836c663564a67882ec38c105546b124d93d0
parent 5891a5d4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment