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

Commit c4c41120 authored by Andrea Ambu's avatar Andrea Ambu
Browse files

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
parent ac77fab3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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;
        }