summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandeep Siddhartha <sansid@google.com>2014-08-25 16:18:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-08-25 16:18:55 +0000
commit4b4d7efe522b01237b842c23a1d92559fe412a6e (patch)
treec70b797cba977c0d5a6fc332319f5a3547668a31
parent73e6ae949cdb2964af7bc1054665be4d175970bb (diff)
parentfb30d6936a4793a3369fbf8bf51fa526b8a77272 (diff)
downloadframeworks_base-4b4d7efe522b01237b842c23a1d92559fe412a6e.zip
frameworks_base-4b4d7efe522b01237b842c23a1d92559fe412a6e.tar.gz
frameworks_base-4b4d7efe522b01237b842c23a1d92559fe412a6e.tar.bz2
Merge "Fix conversion of locale from BCP47 language tag" into lmp-dev
-rw-r--r--core/java/android/service/voice/VoiceInteractionService.java2
-rw-r--r--tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java
index 884fa9f..91b1cc4 100644
--- a/core/java/android/service/voice/VoiceInteractionService.java
+++ b/core/java/android/service/voice/VoiceInteractionService.java
@@ -208,7 +208,7 @@ public class VoiceInteractionService extends Service {
@Deprecated
public final AlwaysOnHotwordDetector createAlwaysOnHotwordDetector(
String keyphrase, String locale, AlwaysOnHotwordDetector.Callback callback) {
- return createAlwaysOnHotwordDetector(keyphrase, new Locale(locale), callback);
+ return createAlwaysOnHotwordDetector(keyphrase, Locale.forLanguageTag(locale), callback);
}
/**
diff --git a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
index 1233c0c..e1a579c 100644
--- a/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
+++ b/tests/VoiceInteraction/src/com/android/test/voiceinteraction/MainInteractionService.java
@@ -69,7 +69,7 @@ public class MainInteractionService extends VoiceInteractionService {
+ Arrays.toString(getKeyphraseEnrollmentInfo().listKeyphraseMetadata()));
mHotwordDetector = createAlwaysOnHotwordDetector(
- "Hello There", new Locale("en-US"), mHotwordCallback);
+ "Hello There", Locale.forLanguageTag("en-US"), mHotwordCallback);
}
@Override