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

Commit 2e2d9956 authored by Jim Miller's avatar Jim Miller Committed by android-build-merger
Browse files

Merge \\\"Always re-enable keyguard state when the user switches.\\\" into...

Merge \\\"Always re-enable keyguard state when the user switches.\\\" into nyc-dev am: 9e94c455 am: 6e5ff1cb
am: f716a049

Change-Id: I0fe6a3fe2e2002c9c89593390aa68348362eb62e
parents 3b057d64 f716a049
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -5352,7 +5352,13 @@ public class WindowManagerService extends IWindowManager.Stub
        // If this isn't coming from the system then don't allow disabling the lockscreen
        // to bypass security.
        if (Binder.getCallingUid() != Process.SYSTEM_UID && isKeyguardSecure()) {
            Log.d(TAG_WM, "current mode is SecurityMode, ignore hide keyguard");
            Log.d(TAG_WM, "current mode is SecurityMode, ignore disableKeyguard");
            return;
        }

        // If this isn't coming from the current user, ignore it.
        if (Binder.getCallingUserHandle().getIdentifier() != mCurrentUserId) {
            Log.d(TAG_WM, "non-current user, ignore disableKeyguard");
            return;
        }

@@ -5667,6 +5673,11 @@ public class WindowManagerService extends IWindowManager.Stub
            mAppTransition.setCurrentUser(newUserId);
            mPolicy.setCurrentUserLw(newUserId);

            // If keyguard was disabled, re-enable it
            // TODO: Keep track of keyguardEnabled state per user and use here...
            // e.g. enabled = mKeyguardDisableHandler.getEnabledStateForUser(newUserId);
            mPolicy.enableKeyguard(true);

            // Hide windows that should not be seen by the new user.
            final int numDisplays = mDisplayContents.size();
            for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
@@ -10036,6 +10047,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    @Override
    public void createWallpaperInputConsumer(InputChannel inputChannel) {
        synchronized (mWindowMap) {
            mWallpaperInputConsumer = new InputConsumerImpl(this, "wallpaper input", inputChannel);
@@ -10044,6 +10056,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    @Override
    public void removeWallpaperInputConsumer() {
        synchronized (mWindowMap) {
            if (mWallpaperInputConsumer != null) {
@@ -11139,6 +11152,7 @@ public class WindowManagerService extends IWindowManager.Stub
        }
    }

    @Override
    public void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver)
            throws RemoteException {
        if (!checkCallingPermission(Manifest.permission.REGISTER_WINDOW_MANAGER_LISTENERS,