summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authord34d <clark@cyngn.com>2016-01-26 10:17:37 -0800
committerClark Scheff <clark@cyngn.com>2016-02-01 08:39:13 -0800
commitbc3f2de0e7d025aa450811440f6df729e431304f (patch)
tree088e8e3cb0b57f62e759de222af9618f3e09513b
parente94af6a423589d6cc4f0813aeb45e2124ea73ea8 (diff)
downloadframeworks_base-bc3f2de0e7d025aa450811440f6df729e431304f.zip
frameworks_base-bc3f2de0e7d025aa450811440f6df729e431304f.tar.gz
frameworks_base-bc3f2de0e7d025aa450811440f6df729e431304f.tar.bz2
SysUI: Listen for changes to LIVE_LOCK_SCREEN_ENABLED
Change-Id: I242c80c737752c7be1598f02e6d148cbdd96e0b4 TICKET: CYNGNOS-1720
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
index db5446e..2713cd0 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
@@ -232,6 +232,7 @@ public class NotificationPanelView extends PanelView implements
private ComponentName mThirdPartyKeyguardViewComponent;
private KeyguardExternalView mKeyguardExternalView;
private CmLockPatternUtils mLockPatternUtils;
+ private boolean mLiveLockScreenEnabled;
private Runnable mHeadsUpExistenceChangedRunnable = new Runnable() {
@Override
@@ -2592,6 +2593,8 @@ public class NotificationPanelView extends PanelView implements
CMSettings.System.STATUS_BAR_QUICK_QS_PULLDOWN), false, this);
resolver.registerContentObserver(CMSettings.System.getUriFor(
CMSettings.System.DOUBLE_TAP_SLEEP_GESTURE), false, this);
+ resolver.registerContentObserver(CMSettings.Secure.getUriFor(
+ CMSettings.Secure.LIVE_LOCK_SCREEN_ENABLED), false, this);
update();
}
@@ -2616,6 +2619,13 @@ public class NotificationPanelView extends PanelView implements
resolver, CMSettings.System.STATUS_BAR_QUICK_QS_PULLDOWN, 1);
mDoubleTapToSleepEnabled = CMSettings.System.getInt(
resolver, CMSettings.System.DOUBLE_TAP_SLEEP_GESTURE, 1) == 1;
+
+ boolean liveLockScreenEnabled = CMSettings.Secure.getInt(
+ resolver, CMSettings.Secure.LIVE_LOCK_SCREEN_ENABLED, 0) == 1;
+ if (liveLockScreenEnabled != mLiveLockScreenEnabled) {
+ mLiveLockScreenEnabled = liveLockScreenEnabled;
+ updateExternalKeyguardView();
+ }
}
}
@@ -2709,7 +2719,8 @@ public class NotificationPanelView extends PanelView implements
}
private void updateExternalKeyguardView() {
- ComponentName cn = mLockPatternUtils.getThirdPartyKeyguardComponent();
+ ComponentName cn = mLiveLockScreenEnabled ?
+ mLockPatternUtils.getThirdPartyKeyguardComponent() : null;
// If mThirdPartyKeyguardViewComponent differs from cn, go ahead and update
if (!Objects.equals(mThirdPartyKeyguardViewComponent, cn)) {
mThirdPartyKeyguardViewComponent = cn;