summaryrefslogtreecommitdiffstats
path: root/tests/VoiceInteraction
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2014-08-05 15:03:46 -0700
committerSandeep Siddhartha <sansid@google.com>2014-08-07 11:53:02 -0700
commitcb4e81c7fe1ec843d80f7604a688c71086c23685 (patch)
treec3ea65e45d02993cd7c3af55222c5cda5ec08998 /tests/VoiceInteraction
parent3da5ba05d601778ea11dd87c1e8c9e9827e2a520 (diff)
downloadframeworks_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.java10
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;