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

Commit 19a2507e authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Set Assistant UID of the current user."

parents 377b5543 1a7070a6
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1461,10 +1461,13 @@ public class AudioService extends IAudioService.Stub
        }
        if (!TextUtils.isEmpty(packageName)) {
            PackageManager pm = mContext.getPackageManager();
            ActivityManager am =
                          (ActivityManager) mContext.getSystemService(mContext.ACTIVITY_SERVICE);

            if (pm.checkPermission(Manifest.permission.CAPTURE_AUDIO_HOTWORD, packageName)
                    == PackageManager.PERMISSION_GRANTED) {
                try {
                    assistantUid = pm.getPackageUid(packageName, 0);
                    assistantUid = pm.getPackageUidAsUser(packageName, am.getCurrentUser());
                } catch (PackageManager.NameNotFoundException e) {
                    Log.e(TAG,
                            "updateAssistantUId() could not find UID for package: " + packageName);