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

Commit 1ee9d6dd authored by Evan Rosky's avatar Evan Rosky Committed by Android (Google) Code Review
Browse files

Merge "Separate out locked part of setLockScreenShown" into main

parents f7e95e04 1ebedeef
Loading
Loading
Loading
Loading
+36 −29
Original line number Diff line number Diff line
@@ -2988,9 +2988,18 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            throw new SecurityException("Requires permission "
                    + android.Manifest.permission.DEVICE_POWER);
        }

        synchronized (mGlobalLock) {
        final long ident = Binder.clearCallingIdentity();
        try {
            synchronized (mGlobalLock) {
                setLockScreenShownLocked(keyguardShowing, aodShowing);
            }
        } finally {
            Binder.restoreCallingIdentity(ident);
        }
    }

    @GuardedBy("mGlobalLock")
    void setLockScreenShownLocked(boolean keyguardShowing, boolean aodShowing) {
        if (mKeyguardShown != keyguardShowing) {
            mKeyguardShown = keyguardShowing;
            final Message msg = PooledLambda.obtainMessage(
@@ -3017,8 +3026,6 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
            maybeHideLockedProfileActivityLocked();
        } finally {
            Trace.traceEnd(TRACE_TAG_WINDOW_MANAGER);
                Binder.restoreCallingIdentity(ident);
            }
        }

        mH.post(() -> {
+1 −1
Original line number Diff line number Diff line
@@ -1865,7 +1865,7 @@ class WindowOrganizerController extends IWindowOrganizerController.Stub
        if (keyguardState != null) {
            boolean keyguardShowing = keyguardState.getKeyguardShowing();
            boolean aodShowing = keyguardState.getAodShowing();
            mService.setLockScreenShown(keyguardShowing, aodShowing);
            mService.setLockScreenShownLocked(keyguardShowing, aodShowing);
        }
        return effects;
    }