Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +23 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final int MSG_SERVICE_STATE_CHANGE = 330; private static final int MSG_SCREEN_TURNED_ON = 331; private static final int MSG_SCREEN_TURNED_OFF = 332; private static final int MSG_DREAMING_STATE_CHANGED = 333; /** Fingerprint state: Not listening to fingerprint. */ private static final int FINGERPRINT_STATE_STOPPED = 0; Loading Loading @@ -293,6 +294,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { handleScreenTurnedOff(); Trace.endSection(); break; case MSG_DREAMING_STATE_CHANGED: handleDreamingStateChanged(msg.arg1); break; } } }; Loading Loading @@ -990,6 +994,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private void handleDreamingStateChanged(int dreamStart) { final int count = mCallbacks.size(); boolean showingDream = dreamStart == 1; for (int i = 0; i < count; i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onDreamingStateChanged(showingDream); } } } /** * IMPORTANT: Must be called from UI thread. */ Loading Loading @@ -1736,6 +1751,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mHandler.sendEmptyMessage(MSG_SCREEN_TURNED_OFF); } public void dispatchDreamingStarted() { mHandler.sendMessage(mHandler.obtainMessage(MSG_DREAMING_STATE_CHANGED, 1, 0)); } public void dispatchDreamingStopped() { mHandler.sendMessage(mHandler.obtainMessage(MSG_DREAMING_STATE_CHANGED, 0, 0)); } public boolean isDeviceInteractive() { return mDeviceInteractive; } Loading packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +6 −0 Original line number Diff line number Diff line Loading @@ -245,4 +245,10 @@ public class KeyguardUpdateMonitorCallback { * Called when the state whether we have a lockscreen wallpaper has changed. */ public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) { } /** * Called when the dream's window state is changed. * @param dreaming true if the dream's window has been created and is visible */ public void onDreamingStateChanged(boolean dreaming) { } } packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +2 −0 Original line number Diff line number Diff line Loading @@ -964,6 +964,7 @@ public class KeyguardViewMediator extends SystemUI { * if there is a secure lock pattern. */ public void onDreamingStarted() { KeyguardUpdateMonitor.getInstance(mContext).dispatchDreamingStarted(); synchronized (this) { if (mDeviceInteractive && mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser())) { Loading @@ -976,6 +977,7 @@ public class KeyguardViewMediator extends SystemUI { * A dream stopped. */ public void onDreamingStopped() { KeyguardUpdateMonitor.getInstance(mContext).dispatchDreamingStopped(); synchronized (this) { if (mDeviceInteractive) { cancelDoKeyguardLaterLocked(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +12 −2 Original line number Diff line number Diff line Loading @@ -664,6 +664,15 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private boolean mNoAnimationOnNextBarModeChange; private FalsingManager mFalsingManager; private KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { @Override public void onDreamingStateChanged(boolean dreaming) { if (dreaming) { maybeEscalateHeadsUp(); } } }; @Override public void start() { mDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE)) Loading Loading @@ -701,8 +710,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mUnlockMethodCache.addListener(this); startKeyguard(); KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateCallback); mDozeServiceHost = new DozeServiceHost(); KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mDozeServiceHost); putComponent(DozeHost.class, mDozeServiceHost); putComponent(PhoneStatusBar.class, this); Loading Loading @@ -4445,6 +4454,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } if (state == StatusBarState.KEYGUARD) { removeRemoteInputEntriesKeptUntilCollapsed(); maybeEscalateHeadsUp(); } mState = state; mGroupManager.setStatusBarState(state); Loading Loading @@ -4964,7 +4974,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } private final class DozeServiceHost extends KeyguardUpdateMonitorCallback implements DozeHost { private final class DozeServiceHost implements DozeHost { // Amount of time to allow to update the time shown on the screen before releasing // the wakelock. This timeout is design to compensate for the fact that we don't // currently have a way to know when time display contents have actually been Loading packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -381,7 +381,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL } public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo info) { if (mIsExpanded) { if (mIsExpanded || mBar.isBouncerShowing()) { // The touchable region is always the full area when expanded return; } Loading Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitor.java +23 −0 Original line number Diff line number Diff line Loading @@ -141,6 +141,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { private static final int MSG_SERVICE_STATE_CHANGE = 330; private static final int MSG_SCREEN_TURNED_ON = 331; private static final int MSG_SCREEN_TURNED_OFF = 332; private static final int MSG_DREAMING_STATE_CHANGED = 333; /** Fingerprint state: Not listening to fingerprint. */ private static final int FINGERPRINT_STATE_STOPPED = 0; Loading Loading @@ -293,6 +294,9 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { handleScreenTurnedOff(); Trace.endSection(); break; case MSG_DREAMING_STATE_CHANGED: handleDreamingStateChanged(msg.arg1); break; } } }; Loading Loading @@ -990,6 +994,17 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } private void handleDreamingStateChanged(int dreamStart) { final int count = mCallbacks.size(); boolean showingDream = dreamStart == 1; for (int i = 0; i < count; i++) { KeyguardUpdateMonitorCallback cb = mCallbacks.get(i).get(); if (cb != null) { cb.onDreamingStateChanged(showingDream); } } } /** * IMPORTANT: Must be called from UI thread. */ Loading Loading @@ -1736,6 +1751,14 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { mHandler.sendEmptyMessage(MSG_SCREEN_TURNED_OFF); } public void dispatchDreamingStarted() { mHandler.sendMessage(mHandler.obtainMessage(MSG_DREAMING_STATE_CHANGED, 1, 0)); } public void dispatchDreamingStopped() { mHandler.sendMessage(mHandler.obtainMessage(MSG_DREAMING_STATE_CHANGED, 0, 0)); } public boolean isDeviceInteractive() { return mDeviceInteractive; } Loading
packages/Keyguard/src/com/android/keyguard/KeyguardUpdateMonitorCallback.java +6 −0 Original line number Diff line number Diff line Loading @@ -245,4 +245,10 @@ public class KeyguardUpdateMonitorCallback { * Called when the state whether we have a lockscreen wallpaper has changed. */ public void onHasLockscreenWallpaperChanged(boolean hasLockscreenWallpaper) { } /** * Called when the dream's window state is changed. * @param dreaming true if the dream's window has been created and is visible */ public void onDreamingStateChanged(boolean dreaming) { } }
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +2 −0 Original line number Diff line number Diff line Loading @@ -964,6 +964,7 @@ public class KeyguardViewMediator extends SystemUI { * if there is a secure lock pattern. */ public void onDreamingStarted() { KeyguardUpdateMonitor.getInstance(mContext).dispatchDreamingStarted(); synchronized (this) { if (mDeviceInteractive && mLockPatternUtils.isSecure(KeyguardUpdateMonitor.getCurrentUser())) { Loading @@ -976,6 +977,7 @@ public class KeyguardViewMediator extends SystemUI { * A dream stopped. */ public void onDreamingStopped() { KeyguardUpdateMonitor.getInstance(mContext).dispatchDreamingStopped(); synchronized (this) { if (mDeviceInteractive) { cancelDoKeyguardLaterLocked(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +12 −2 Original line number Diff line number Diff line Loading @@ -664,6 +664,15 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, private boolean mNoAnimationOnNextBarModeChange; private FalsingManager mFalsingManager; private KeyguardUpdateMonitorCallback mUpdateCallback = new KeyguardUpdateMonitorCallback() { @Override public void onDreamingStateChanged(boolean dreaming) { if (dreaming) { maybeEscalateHeadsUp(); } } }; @Override public void start() { mDisplay = ((WindowManager)mContext.getSystemService(Context.WINDOW_SERVICE)) Loading Loading @@ -701,8 +710,8 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, mUnlockMethodCache.addListener(this); startKeyguard(); KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mUpdateCallback); mDozeServiceHost = new DozeServiceHost(); KeyguardUpdateMonitor.getInstance(mContext).registerCallback(mDozeServiceHost); putComponent(DozeHost.class, mDozeServiceHost); putComponent(PhoneStatusBar.class, this); Loading Loading @@ -4445,6 +4454,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } if (state == StatusBarState.KEYGUARD) { removeRemoteInputEntriesKeptUntilCollapsed(); maybeEscalateHeadsUp(); } mState = state; mGroupManager.setStatusBarState(state); Loading Loading @@ -4964,7 +4974,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode, } } private final class DozeServiceHost extends KeyguardUpdateMonitorCallback implements DozeHost { private final class DozeServiceHost implements DozeHost { // Amount of time to allow to update the time shown on the screen before releasing // the wakelock. This timeout is design to compensate for the fact that we don't // currently have a way to know when time display contents have actually been Loading
packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -381,7 +381,7 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL } public void onComputeInternalInsets(ViewTreeObserver.InternalInsetsInfo info) { if (mIsExpanded) { if (mIsExpanded || mBar.isBouncerShowing()) { // The touchable region is always the full area when expanded return; } Loading