Merge "Always re-enable keyguard state when the user switches." into nyc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
9e94c455f8
@@ -5346,7 +5346,13 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
// If this isn't coming from the system then don't allow disabling the lockscreen
|
// If this isn't coming from the system then don't allow disabling the lockscreen
|
||||||
// to bypass security.
|
// to bypass security.
|
||||||
if (Binder.getCallingUid() != Process.SYSTEM_UID && isKeyguardSecure()) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5661,6 +5667,11 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
mAppTransition.setCurrentUser(newUserId);
|
mAppTransition.setCurrentUser(newUserId);
|
||||||
mPolicy.setCurrentUserLw(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.
|
// Hide windows that should not be seen by the new user.
|
||||||
final int numDisplays = mDisplayContents.size();
|
final int numDisplays = mDisplayContents.size();
|
||||||
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
|
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
|
||||||
@@ -10022,6 +10033,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void createWallpaperInputConsumer(InputChannel inputChannel) {
|
public void createWallpaperInputConsumer(InputChannel inputChannel) {
|
||||||
synchronized (mWindowMap) {
|
synchronized (mWindowMap) {
|
||||||
mWallpaperInputConsumer = new InputConsumerImpl(this, "wallpaper input", inputChannel);
|
mWallpaperInputConsumer = new InputConsumerImpl(this, "wallpaper input", inputChannel);
|
||||||
@@ -10030,6 +10042,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void removeWallpaperInputConsumer() {
|
public void removeWallpaperInputConsumer() {
|
||||||
synchronized (mWindowMap) {
|
synchronized (mWindowMap) {
|
||||||
if (mWallpaperInputConsumer != null) {
|
if (mWallpaperInputConsumer != null) {
|
||||||
@@ -11125,6 +11138,7 @@ public class WindowManagerService extends IWindowManager.Stub
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver)
|
public void registerShortcutKey(long shortcutCode, IShortcutService shortcutKeyReceiver)
|
||||||
throws RemoteException {
|
throws RemoteException {
|
||||||
if (!checkCallingPermission(Manifest.permission.REGISTER_WINDOW_MANAGER_LISTENERS,
|
if (!checkCallingPermission(Manifest.permission.REGISTER_WINDOW_MANAGER_LISTENERS,
|
||||||
|
|||||||
Reference in New Issue
Block a user