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

Commit 9260d568 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Fix the issue of voice interactor getting reset after reboot.

Bug: 35308046
Test: manual
Change-Id: I71ca106f1186e3cebc7899eca30f7b7746fe1e6c
parent 9394a8fc
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -302,9 +302,13 @@ public class VoiceInteractionManagerService extends SystemService {
                ComponentName curInteractor = !TextUtils.isEmpty(curInteractorStr)
                        ? ComponentName.unflattenFromString(curInteractorStr) : null;
                try {
                    recognizerInfo = pm.getServiceInfo(curRecognizer, 0, userHandle);
                    recognizerInfo = pm.getServiceInfo(curRecognizer,
                            PackageManager.MATCH_DIRECT_BOOT_AWARE
                                    | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, userHandle);
                    if (curInteractor != null) {
                        interactorInfo = pm.getServiceInfo(curInteractor, 0, userHandle);
                        interactorInfo = pm.getServiceInfo(curInteractor,
                                PackageManager.MATCH_DIRECT_BOOT_AWARE
                                        | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, userHandle);
                    }
                } catch (RemoteException e) {
                }
@@ -492,7 +496,9 @@ public class VoiceInteractionManagerService extends SystemService {
        ComponentName findAvailRecognizer(String prefPackage, int userHandle) {
            List<ResolveInfo> available =
                    mContext.getPackageManager().queryIntentServicesAsUser(
                            new Intent(RecognitionService.SERVICE_INTERFACE), 0, userHandle);
                            new Intent(RecognitionService.SERVICE_INTERFACE),
                            PackageManager.MATCH_DIRECT_BOOT_AWARE
                                    | PackageManager.MATCH_DIRECT_BOOT_UNAWARE, userHandle);
            int numAvailable = available.size();

            if (numAvailable == 0) {