Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08157c42 authored by Chris Thornton's avatar Chris Thornton
Browse files

The VIS should return an AOHD regardless of keyphrase availability.

Bug: 64932385
Test: Revert to previous behaviour
Change-Id: I10ae9ffe189a5d2dda5c74d0cff05f57e2f9bad7
parent dd09e994
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -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,11 +272,9 @@ 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);
        }
        }
        return mHotwordDetector;
    }