diff options
author | Arunesh Mishra <arunesh@google.com> | 2016-02-18 16:16:12 -0800 |
---|---|---|
committer | Arunesh Mishra <arunesh@google.com> | 2016-02-24 12:57:01 -0800 |
commit | f47f173b06e2972bb376da8ff11db3a83c21d10b (patch) | |
tree | 0112c168702444476bf2324a0dc5a09e66af5b57 /tests/SoundTriggerTestApp | |
parent | a572e4a87b361398a8a8b4ce485fe9226472c81f (diff) |
Fix AlwaysOnHotwordDetector recognition event bug.
Parcelables don't work well with inheritance. So changed the
IRecognitionStatusCallback to have onKeyphraseDetected() and
onGenericSoundTriggerDetected() for those respective events.
Made corresponding changes to AlwaysOnHotwordDetector and SoundTriggerDetector.
Bug: 27250528
Change-Id: Ic08a431e7cc4248c688b05c865348170246de576
Diffstat (limited to 'tests/SoundTriggerTestApp')
-rw-r--r-- | tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java index 95e2dcffe9c4..4770c056814c 100644 --- a/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java +++ b/tests/SoundTriggerTestApp/src/com/android/test/soundtrigger/TestSoundTriggerActivity.java @@ -204,7 +204,10 @@ public class TestSoundTriggerActivity extends Activity { UUID modelUuid = getSelectedUuid(); SoundTriggerDetector detector = getDetector(); if (detector == null) { - Log.i(TAG, "Created an instance of the SoundTriggerDetector."); + Log.i(TAG, "Created an instance of the SoundTriggerDetector for model #" + + mSelectedModelId); + postMessage("Created an instance of the SoundTriggerDetector for model #" + + mSelectedModelId); detector = mSoundTriggerUtil.createSoundTriggerDetector(modelUuid, new DetectorCallback()); setDetector(detector); @@ -213,6 +216,7 @@ public class TestSoundTriggerActivity extends Activity { if (!detector.startRecognition( SoundTriggerDetector.RECOGNITION_FLAG_ALLOW_MULTIPLE_TRIGGERS)) { Log.e(TAG, "Fast failure attempting to start recognition."); + postMessage("Fast failure attempting to start recognition:" + mSelectedModelId); } } @@ -220,11 +224,13 @@ public class TestSoundTriggerActivity extends Activity { SoundTriggerDetector detector = getDetector(); if (detector == null) { Log.e(TAG, "Stop called on null detector."); + postMessage("Error: Stop called on null detector."); return; } postMessage("Triggering stop recognition for model: " + mSelectedModelId); if (!detector.stopRecognition()) { Log.e(TAG, "Fast failure attempting to stop recognition."); + postMessage("Fast failure attempting to stop recognition: " + mSelectedModelId); } } |