Merge "Explicitly specify user for public mode" into lmp-mr1-dev

This commit is contained in:
Adrian Roos
2014-11-21 17:56:59 +00:00
committed by Android (Google) Code Review
2 changed files with 6 additions and 1 deletions

View File

@ -3183,6 +3183,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
public void userSwitched(int newUserId) {
if (MULTIUSER_DEBUG) mNotificationPanelDebugText.setText("USER " + newUserId);
animateCollapsePanels();
updatePublicMode();
updateNotifications();
resetUserSetupObserver();
setControllerUsers();
@ -3674,7 +3675,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
private void updatePublicMode() {
setLockscreenPublicMode(mStatusBarKeyguardViewManager.isShowing()
&& mStatusBarKeyguardViewManager.isSecure());
&& mStatusBarKeyguardViewManager.isSecure(mCurrentUserId));
}
private void updateKeyguardState(boolean goingToFullShade, boolean fromShadeLocked) {

View File

@ -426,4 +426,8 @@ public class StatusBarKeyguardViewManager {
public boolean isGoingToNotificationShade() {
return mPhoneStatusBar.isGoingToNotificationShade();
}
public boolean isSecure(int userId) {
return mBouncer.isSecure() || mLockPatternUtils.isSecure(userId);
}
}