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

Commit aba4253c authored by Ahaan Ugale's avatar Ahaan Ugale Committed by Automerger Merge Worker
Browse files

Merge "Don't change the voice interactor setting if it's explicitly unset."...

Merge "Don't change the voice interactor setting if it's explicitly unset." into rvc-qpr-dev am: 8b6f7f10

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/13234020

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I03779bf004129f03424e6f9af8d75c782965345b
parents 22bf2895 8b6f7f10
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -395,8 +395,9 @@ public class VoiceInteractionManagerService extends SystemService {
                        + interactorInfo + ")");
            }

            // Initializing settings, look for an interactor first (but only on non-svelte).
            if (curInteractorInfo == null && mEnableService) {
            // Initializing settings. Look for an interactor first, but only on non-svelte and only
            // if the user hasn't explicitly unset it.
            if (curInteractorInfo == null && mEnableService && !"".equals(curInteractorStr)) {
                curInteractorInfo = findAvailInteractor(userHandle, null);
            }

@@ -1692,8 +1693,13 @@ public class VoiceInteractionManagerService extends SystemService {
                if (isPackageAppearing(pkgName) != PACKAGE_UNCHANGED) {
                    return;
                }
                final String curInteractorStr = Settings.Secure.getStringForUser(
                        mContext.getContentResolver(),
                        Settings.Secure.VOICE_INTERACTION_SERVICE, mCurUser);
                final ComponentName curInteractor = getCurInteractor(mCurUser);
                if (curInteractor == null) {
                // If there's no interactor and the user hasn't explicitly unset it, check if the
                // modified package offers one.
                if (curInteractor == null && !"".equals(curInteractorStr)) {
                    final VoiceInteractionServiceInfo availInteractorInfo
                            = findAvailInteractor(mCurUser, pkgName);
                    if (availInteractorInfo != null) {