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

Commit fb30d693 authored by Sandeep Siddhartha's avatar Sandeep Siddhartha
Browse files

Fix conversion of locale from BCP47 language tag

Bug: 17187528
Change-Id: Ifcf707c9be736885f3fc79f3c36087ecf9092971
parent a2c1449b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
    }

    /**
+1 −1
Original line number Diff line number Diff line
@@ -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