Merge "Properly set default voice interactor" into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e34bb5a1ff
@@ -61,7 +61,11 @@ public class VoiceInteractionServiceInfo {
|
|||||||
throws PackageManager.NameNotFoundException {
|
throws PackageManager.NameNotFoundException {
|
||||||
try {
|
try {
|
||||||
ServiceInfo si = AppGlobals.getPackageManager().getServiceInfo(comp,
|
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) {
|
if (si != null) {
|
||||||
return si;
|
return si;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ package com.android.server.voiceinteraction;
|
|||||||
import android.Manifest;
|
import android.Manifest;
|
||||||
import android.app.ActivityManager;
|
import android.app.ActivityManager;
|
||||||
import android.app.ActivityManagerInternal;
|
import android.app.ActivityManagerInternal;
|
||||||
import android.app.ActivityManagerNative;
|
|
||||||
import android.app.AppGlobals;
|
import android.app.AppGlobals;
|
||||||
import android.content.ComponentName;
|
import android.content.ComponentName;
|
||||||
import android.content.ContentResolver;
|
import android.content.ContentResolver;
|
||||||
@@ -415,7 +414,10 @@ public class VoiceInteractionManagerService extends SystemService {
|
|||||||
VoiceInteractionServiceInfo findAvailInteractor(int userHandle, String packageName) {
|
VoiceInteractionServiceInfo findAvailInteractor(int userHandle, String packageName) {
|
||||||
List<ResolveInfo> available =
|
List<ResolveInfo> available =
|
||||||
mContext.getPackageManager().queryIntentServicesAsUser(
|
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();
|
int numAvailable = available.size();
|
||||||
|
|
||||||
if (numAvailable == 0) {
|
if (numAvailable == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user