summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src
diff options
context:
space:
mode:
authorRoman Birg <roman@cyngn.com>2015-10-26 10:41:34 -0700
committerRoman Birg <roman@cyngn.com>2016-02-08 16:27:33 -0800
commitedd5748e07b671c81e12a25722cd1e293d774dab (patch)
tree49ef015c1fc0a310251a80bfa0078918eb384e06 /packages/SystemUI/src
parent47a4c8062adf2980dfcfd10bcedbfd3250c7218a (diff)
downloadframeworks_base-edd5748e07b671c81e12a25722cd1e293d774dab.zip
frameworks_base-edd5748e07b671c81e12a25722cd1e293d774dab.tar.gz
frameworks_base-edd5748e07b671c81e12a25722cd1e293d774dab.tar.bz2
SystemUI: update keyguard state when profiles disable keyguard
Also add a broadcast receiver to watch for profile changes/updates and update the tile whenever we receive those. Ref: OSS NIGHTLIES-1721, CYNGNOS-1930 Change-Id: I68d4789159cb9a0a25609380054ae5545c9df5bd Signed-off-by: Roman Birg <roman@cyngn.com>
Diffstat (limited to 'packages/SystemUI/src')
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
index dd76a3e..c78119e 100755
--- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
+++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
@@ -971,6 +971,12 @@ public class KeyguardViewMediator extends SystemUI {
return !mInternallyDisabled;
}
+ private boolean isProfileDisablingKeyguard() {
+ final Profile activeProfile = ProfileManager.getInstance(mContext).getActiveProfile();
+ return activeProfile != null
+ && activeProfile.getScreenLockMode().getValue() == Profile.LockMode.DISABLE;
+ }
+
/**
* Same semantics as {@link android.view.WindowManagerPolicy#enableKeyguard}; provide
* a way for external stuff to override normal keyguard behavior. For instance
@@ -999,7 +1005,7 @@ public class KeyguardViewMediator extends SystemUI {
// hiding keyguard that is showing, remember to reshow later
if (DEBUG) Log.d(TAG, "remembering to reshow, hiding keyguard, "
+ "disabling status bar expansion");
- mNeedToReshowWhenReenabled = true;
+ mNeedToReshowWhenReenabled = !isProfileDisablingKeyguard();
updateInputRestrictedLocked();
hideLocked();
} else if (enabled && mNeedToReshowWhenReenabled) {