summaryrefslogtreecommitdiffstats
path: root/tests/VoiceInteraction
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2014-08-22 16:36:34 -0700
committerSandeep Siddhartha <sansid@google.com>2014-08-22 17:23:13 -0700
commitdcf3068fcb55f101680e70a8a6f84f3b2c9cb1e3 (patch)
treec1ddf18c69ab22a4ccc2d3f54b57780494dc6470 /tests/VoiceInteraction
parent7653a30ea0232ab8323ec51ddcba8d8054ca8a2f (diff)
downloadframeworks_base-dcf3068fcb55f101680e70a8a6f84f3b2c9cb1e3.zip
frameworks_base-dcf3068fcb55f101680e70a8a6f84f3b2c9cb1e3.tar.gz
frameworks_base-dcf3068fcb55f101680e70a8a6f84f3b2c9cb1e3.tar.bz2
Fix the Locale story in the hotword API
Tighten the API by taking in a locale rather than a string tag. Tighten the checks when reading the enrollment metadata, bail out if any attribute is missing or invalid. Add missing recycle call for a TypedArray Stop recognition when sound model(s) change. This is needed during un-enrollment/re-enrollment. Bug: 17187528 Bug: 17205230 Change-Id: Idb00b51ef8c4ea0a8f8993decea582223181fa3d
Diffstat (limited to 'tests/VoiceInteraction')
-rw-r--r--tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
index 77c0c32..1233c0c 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
@@ -25,6 +25,7 @@ import android.service.voice.VoiceInteractionService;
import android.util.Log;
import java.util.Arrays;
+import java.util.Locale;
public class MainInteractionService extends VoiceInteractionService {
static final String TAG = "MainInteractionService";
@@ -67,7 +68,8 @@ public class MainInteractionService extends VoiceInteractionService {
Log.i(TAG, "Keyphrase enrollment meta-data: "
+ Arrays.toString(getKeyphraseEnrollmentInfo().listKeyphraseMetadata()));
- mHotwordDetector = createAlwaysOnHotwordDetector("Hello There", "en-US", mHotwordCallback);
+ mHotwordDetector = createAlwaysOnHotwordDetector(
+ "Hello There", new Locale("en-US"), mHotwordCallback);
}
@Override