diff options
author | Sandeep Siddhartha <sansid@google.com> | 2014-08-05 15:03:46 -0700 |
---|---|---|
committer | Sandeep Siddhartha <sansid@google.com> | 2014-08-07 11:53:02 -0700 |
commit | cb4e81c7fe1ec843d80f7604a688c71086c23685 (patch) | |
tree | c3ea65e45d02993cd7c3af55222c5cda5ec08998 /tests/VoiceInteraction | |
parent | 3da5ba05d601778ea11dd87c1e8c9e9827e2a520 (diff) | |
download | frameworks_base-cb4e81c7fe1ec843d80f7604a688c71086c23685.zip frameworks_base-cb4e81c7fe1ec843d80f7604a688c71086c23685.tar.gz frameworks_base-cb4e81c7fe1ec843d80f7604a688c71086c23685.tar.bz2 |
Handle microphone contention/Phone calls while recognition is active
Internally we pause the recognition when:
- a phone call is active/off-hook/ringing
- or some other application grabs the microphone
we auto-resume when the condition that caused us to pause reverses.
Both these events are notified to the client via callbacks so that they can choose to display on their UI,
that the recognition is paused for some reason.
Bug: 16515468
Bug: 16740806
Bug: 16514535
Change-Id: Ib274d68522c8cf37d42402c875b16159957657f0
Diffstat (limited to 'tests/VoiceInteraction')
-rw-r--r-- | tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java index fcc4626..77c0c32 100644 --- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java +++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java @@ -45,6 +45,16 @@ public class MainInteractionService extends VoiceInteractionService { public void onError() { Log.i(TAG, "onError"); } + + @Override + public void onRecognitionPaused() { + Log.i(TAG, "onRecognitionPaused"); + } + + @Override + public void onRecognitionResumed() { + Log.i(TAG, "onRecognitionResumed"); + } }; private AlwaysOnHotwordDetector mHotwordDetector; |