diff options
| author | 2017-08-24 16:31:19 +0000 | |
|---|---|---|
| committer | 2017-08-24 16:31:19 +0000 | |
| commit | 4a4db678aa809fd3695a476d488dcb51fc5b53e1 (patch) | |
| tree | 7092bbe0f822a96f5fc9868e568c24025f254375 | |
| parent | c5395645cfef7d8865d00d5931180c2ae2a7db21 (diff) | |
| parent | edb86c3933374caabd3b7d3eac561cc647513eb5 (diff) | |
Merge "The VIS should return an AOHD regardless of keyphrase availability." into oc-mr1-dev am: 0a14929b77
am: edb86c3933
Change-Id: Ia298587cd12331206038f70ddc949782105558f0
| -rw-r--r-- | core/java/android/service/voice/VoiceInteractionService.java | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/core/java/android/service/voice/VoiceInteractionService.java b/core/java/android/service/voice/VoiceInteractionService.java index fbc6fc6c3cd6..8f79bcffa776 100644 --- a/core/java/android/service/voice/VoiceInteractionService.java +++ b/core/java/android/service/voice/VoiceInteractionService.java @@ -262,8 +262,7 @@ public class VoiceInteractionService extends Service { * @param keyphrase The keyphrase that's being used, for example "Hello Android". * @param locale The locale for which the enrollment needs to be performed. * @param callback The callback to notify of detection events. - * @return An always-on hotword detector for the given keyphrase and locale. Is null if the - * keyphrase and locale is not supported. + * @return An always-on hotword detector for the given keyphrase and locale. */ public final AlwaysOnHotwordDetector createAlwaysOnHotwordDetector( String keyphrase, Locale locale, AlwaysOnHotwordDetector.Callback callback) { @@ -273,10 +272,8 @@ public class VoiceInteractionService extends Service { synchronized (mLock) { // Allow only one concurrent recognition via the APIs. safelyShutdownHotwordDetector(); - if (isKeyphraseAndLocaleSupportedForHotword(keyphrase, locale)) { - mHotwordDetector = new AlwaysOnHotwordDetector(keyphrase, locale, callback, - mKeyphraseEnrollmentInfo, mInterface, mSystemService); - } + mHotwordDetector = new AlwaysOnHotwordDetector(keyphrase, locale, callback, + mKeyphraseEnrollmentInfo, mInterface, mSystemService); } return mHotwordDetector; } |