diff options
Diffstat (limited to 'packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java')
-rw-r--r-- | packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java index 934e768f9ba8..31ec00378135 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardStatusViewController.java @@ -16,6 +16,7 @@ package com.android.keyguard; +import android.os.UserHandle; import android.util.Slog; import android.view.View; @@ -78,6 +79,8 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV @Override public void onInit() { mKeyguardClockSwitchController.init(); + mView.setEnableMarquee(mKeyguardUpdateMonitor.isDeviceInteractive()); + mView.updateLogoutView(shouldShowLogout()); } @Override @@ -245,6 +248,11 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV } } + private boolean shouldShowLogout() { + return mKeyguardUpdateMonitor.isLogoutEnabled() + && KeyguardUpdateMonitor.getCurrentUser() != UserHandle.USER_SYSTEM; + } + private final ConfigurationController.ConfigurationListener mConfigurationListener = new ConfigurationController.ConfigurationListener() { @Override @@ -267,10 +275,10 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV mKeyguardSliceViewController.updateLockScreenMode(mode); if (mLockScreenMode == KeyguardUpdateMonitor.LOCK_SCREEN_MODE_LAYOUT_1) { mView.setCanShowOwnerInfo(false); - mView.setCanShowLogout(false); + mView.updateLogoutView(false); } else { mView.setCanShowOwnerInfo(true); - mView.setCanShowLogout(false); + mView.updateLogoutView(false); } updateAodIcons(); } @@ -296,7 +304,7 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV if (DEBUG) Slog.v(TAG, "refresh statusview showing:" + showing); refreshTime(); mView.updateOwnerInfo(); - mView.updateLogoutView(); + mView.updateLogoutView(shouldShowLogout()); } } @@ -314,12 +322,12 @@ public class KeyguardStatusViewController extends ViewController<KeyguardStatusV public void onUserSwitchComplete(int userId) { mKeyguardClockSwitchController.refreshFormat(); mView.updateOwnerInfo(); - mView.updateLogoutView(); + mView.updateLogoutView(shouldShowLogout()); } @Override public void onLogoutEnabledChanged() { - mView.updateLogoutView(); + mView.updateLogoutView(shouldShowLogout()); } }; } |