Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +11 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public class DozeScrimController { private float mBehindTarget; private boolean mDozingAborted; private boolean mWakeAndUnlocking; private boolean mFullyPulsing; public DozeScrimController(ScrimController scrimController, Context context) { mContext = context; Loading Loading @@ -136,6 +137,12 @@ public class DozeScrimController { abortPulsing(); } public void pulseOutNow() { if (mPulseCallback != null && mFullyPulsing) { mPulseOut.run(); } } public void onScreenTurnedOn() { if (isPulsing()) { final boolean pickupOrDoubleTap = mPulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP Loading Loading @@ -163,6 +170,7 @@ public class DozeScrimController { if (DEBUG) Log.d(TAG, "Cancel pulsing"); if (mPulseCallback != null) { mFullyPulsing = false; mHandler.removeCallbacks(mPulseIn); mHandler.removeCallbacks(mPulseOut); mHandler.removeCallbacks(mPulseOutExtended); Loading Loading @@ -297,6 +305,7 @@ public class DozeScrimController { mHandler.postDelayed(mPulseOut, mDozeParameters.getPulseVisibleDuration()); mHandler.postDelayed(mPulseOutExtended, mDozeParameters.getPulseVisibleDurationExtended()); mFullyPulsing = true; } }; Loading @@ -311,6 +320,8 @@ public class DozeScrimController { private final Runnable mPulseOut = new Runnable() { @Override public void run() { mFullyPulsing = false; mHandler.removeCallbacks(mPulseOut); mHandler.removeCallbacks(mPulseOutExtended); if (DEBUG) Log.d(TAG, "Pulse out, mDozing=" + mDozing); if (!mDozing) return; Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −0 Original line number Diff line number Diff line Loading @@ -1885,6 +1885,11 @@ public class StatusBar extends SystemUI implements DemoMode, } catch (RemoteException ex) { // system process is dead if we're here. } if (mStackScroller.hasPulsingNotifications() && mHeadsUpManager.getAllEntries().isEmpty()) { // We were showing a pulse for a notification, but no notifications are pulsing anymore. // Finish the pulse. mDozeScrimController.pulseOutNow(); } // end old BaseStatusBar.performRemoveNotification. } Loading Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/DozeScrimController.java +11 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,7 @@ public class DozeScrimController { private float mBehindTarget; private boolean mDozingAborted; private boolean mWakeAndUnlocking; private boolean mFullyPulsing; public DozeScrimController(ScrimController scrimController, Context context) { mContext = context; Loading Loading @@ -136,6 +137,12 @@ public class DozeScrimController { abortPulsing(); } public void pulseOutNow() { if (mPulseCallback != null && mFullyPulsing) { mPulseOut.run(); } } public void onScreenTurnedOn() { if (isPulsing()) { final boolean pickupOrDoubleTap = mPulseReason == DozeLog.PULSE_REASON_SENSOR_PICKUP Loading Loading @@ -163,6 +170,7 @@ public class DozeScrimController { if (DEBUG) Log.d(TAG, "Cancel pulsing"); if (mPulseCallback != null) { mFullyPulsing = false; mHandler.removeCallbacks(mPulseIn); mHandler.removeCallbacks(mPulseOut); mHandler.removeCallbacks(mPulseOutExtended); Loading Loading @@ -297,6 +305,7 @@ public class DozeScrimController { mHandler.postDelayed(mPulseOut, mDozeParameters.getPulseVisibleDuration()); mHandler.postDelayed(mPulseOutExtended, mDozeParameters.getPulseVisibleDurationExtended()); mFullyPulsing = true; } }; Loading @@ -311,6 +320,8 @@ public class DozeScrimController { private final Runnable mPulseOut = new Runnable() { @Override public void run() { mFullyPulsing = false; mHandler.removeCallbacks(mPulseOut); mHandler.removeCallbacks(mPulseOutExtended); if (DEBUG) Log.d(TAG, "Pulse out, mDozing=" + mDozing); if (!mDozing) return; Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java +5 −0 Original line number Diff line number Diff line Loading @@ -1885,6 +1885,11 @@ public class StatusBar extends SystemUI implements DemoMode, } catch (RemoteException ex) { // system process is dead if we're here. } if (mStackScroller.hasPulsingNotifications() && mHeadsUpManager.getAllEntries().isEmpty()) { // We were showing a pulse for a notification, but no notifications are pulsing anymore. // Finish the pulse. mDozeScrimController.pulseOutNow(); } // end old BaseStatusBar.performRemoveNotification. } Loading