speech: queryIntentService-AsUser-
Use queryIntentServicesAsUser rather than queryIntentServices. This will allow to run the check in multiuser scenarios. Bug: 193607146 Test: CtsVoiceRecognitionTestCases Change-Id: I9386bcc04bcaa210e681e109c5cbbfa8695fb38a
This commit is contained in:
@@ -255,8 +255,8 @@ final class SpeechRecognitionManagerServiceImpl extends
|
||||
|
||||
private boolean componentMapsToRecognitionService(@NonNull ComponentName serviceComponent) {
|
||||
List<ResolveInfo> resolveInfos =
|
||||
getContext().getPackageManager().queryIntentServices(
|
||||
new Intent(RecognitionService.SERVICE_INTERFACE), 0);
|
||||
getContext().getPackageManager().queryIntentServicesAsUser(
|
||||
new Intent(RecognitionService.SERVICE_INTERFACE), 0, getUserId());
|
||||
if (resolveInfos == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user