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

Commit a8cdb6f6 authored by Svetoslav Ganov's avatar Svetoslav Ganov Committed by android-build-merger
Browse files

Merge "Properly set default voice interactor" into nyc-dev am: e34bb5a1

am: 13f802dc

* commit '13f802dc':
  Properly set default voice interactor

Change-Id: I29c2a1490877d4b25ca64fee8a53c6970d07a1f2
parents e34a1df1 13f802dc
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -61,7 +61,11 @@ public class VoiceInteractionServiceInfo {
            throws PackageManager.NameNotFoundException {
        try {
            ServiceInfo si = AppGlobals.getPackageManager().getServiceInfo(comp,
                    PackageManager.GET_META_DATA, userHandle);
                    PackageManager.GET_META_DATA
                            | PackageManager.MATCH_DIRECT_BOOT_AWARE
                            | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
                            | PackageManager.MATCH_DEBUG_TRIAGED_MISSING,
                    userHandle);
            if (si != null) {
                return si;
            }
+4 −2
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.server.voiceinteraction;
import android.Manifest;
import android.app.ActivityManager;
import android.app.ActivityManagerInternal;
import android.app.ActivityManagerNative;
import android.app.AppGlobals;
import android.content.ComponentName;
import android.content.ContentResolver;
@@ -415,7 +414,10 @@ public class VoiceInteractionManagerService extends SystemService {
        VoiceInteractionServiceInfo findAvailInteractor(int userHandle, String packageName) {
            List<ResolveInfo> available =
                    mContext.getPackageManager().queryIntentServicesAsUser(
                            new Intent(VoiceInteractionService.SERVICE_INTERFACE), 0, userHandle);
                            new Intent(VoiceInteractionService.SERVICE_INTERFACE),
                            PackageManager.MATCH_DIRECT_BOOT_AWARE
                                    | PackageManager.MATCH_DIRECT_BOOT_UNAWARE
                                    | PackageManager.MATCH_DEBUG_TRIAGED_MISSING, userHandle);
            int numAvailable = available.size();

            if (numAvailable == 0) {