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

Commit f4553c9d authored by Louis Chang's avatar Louis Chang Committed by Android (Google) Code Review
Browse files

Merge "Clear calling identity before updating lock-task packages" into main

parents 0eb63a67 fdd4e6bf
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -2648,10 +2648,16 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            mAmInternal.enforceCallingPermission(Manifest.permission.UPDATE_LOCK_TASK_PACKAGES,
                    "updateLockTaskPackages()");
        }
        final long origId = Binder.clearCallingIdentity();
        try {
            synchronized (mGlobalLock) {
            ProtoLog.w(WM_DEBUG_LOCKTASK, "Allowlisting %d:%s", userId, Arrays.toString(packages));
                ProtoLog.w(WM_DEBUG_LOCKTASK, "Allowlisting %d:%s", userId,
                        Arrays.toString(packages));
                getLockTaskController().updateLockTaskPackages(userId, packages);
            }
        } finally {
            Binder.restoreCallingIdentity(origId);
        }
    }

    @Override