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

Commit fd9569e1 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Ensure we clear binder calling uid prior to removing pinned stacks."

parents 9afe7c81 a6ea005a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -11362,9 +11362,6 @@ public class ActivityManagerService extends IActivityManager.Stub
            throw new IllegalArgumentException("Invalid task, not in foreground");
        }
        // When a task is locked, dismiss the pinned stack if it exists
        mStackSupervisor.removeStacksInWindowingModes(WINDOWING_MODE_PINNED);
        // {@code isSystemCaller} is used to distinguish whether this request is initiated by the
        // system or a specific app.
        // * System-initiated requests will only start the pinned mode (screen pinning)
@@ -11374,6 +11371,9 @@ public class ActivityManagerService extends IActivityManager.Stub
        final int callingUid = Binder.getCallingUid();
        long ident = Binder.clearCallingIdentity();
        try {
            // When a task is locked, dismiss the pinned stack if it exists
            mStackSupervisor.removeStacksInWindowingModes(WINDOWING_MODE_PINNED);
            mLockTaskController.startLockTaskMode(task, isSystemCaller, callingUid);
        } finally {
            Binder.restoreCallingIdentity(ident);