Loading packages/SystemUI/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ <bool name="doze_pulse_on_notifications">true</bool> <!-- Doze: when to pulse after a buzzworthy notification arrives --> <string name="doze_pulse_schedule" translatable="false">1s,10s,30s,60s</string> <string name="doze_pulse_schedule" translatable="false">10s,30s,60s</string> <!-- Doze: maximum number of times the notification pulse schedule can be reset --> <integer name="doze_pulse_schedule_resets">2</integer> Loading packages/SystemUI/src/com/android/systemui/doze/DozeService.java +11 −2 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class DozeService extends DreamService { private boolean mPowerSaveActive; private boolean mCarMode; private long mNotificationPulseTime; private long mLastScheduleResetTime; private long mEarliestPulseDueToLight; private int mScheduleResetsRemaining; Loading Loading @@ -356,13 +357,21 @@ public class DozeService extends DreamService { return; } final long pulseDuration = mDozeParameters.getPulseDuration(false /*pickup*/); if ((notificationTimeMs - mNotificationPulseTime) < pulseDuration) { boolean pulseImmediately = System.currentTimeMillis() >= notificationTimeMs; if ((notificationTimeMs - mLastScheduleResetTime) >= pulseDuration) { mScheduleResetsRemaining--; mLastScheduleResetTime = notificationTimeMs; } else if (!pulseImmediately){ if (DEBUG) Log.d(mTag, "Recently updated, not resetting schedule"); return; } mScheduleResetsRemaining--; if (DEBUG) Log.d(mTag, "mScheduleResetsRemaining = " + mScheduleResetsRemaining); mNotificationPulseTime = notificationTimeMs; if (pulseImmediately) { DozeLog.traceNotificationPulse(0); requestPulse(DozeLog.PULSE_REASON_NOTIFICATION); } // schedule the rest of the pulses rescheduleNotificationPulse(true /*predicate*/); } Loading Loading
packages/SystemUI/res/values/config.xml +1 −1 Original line number Diff line number Diff line Loading @@ -243,7 +243,7 @@ <bool name="doze_pulse_on_notifications">true</bool> <!-- Doze: when to pulse after a buzzworthy notification arrives --> <string name="doze_pulse_schedule" translatable="false">1s,10s,30s,60s</string> <string name="doze_pulse_schedule" translatable="false">10s,30s,60s</string> <!-- Doze: maximum number of times the notification pulse schedule can be reset --> <integer name="doze_pulse_schedule_resets">2</integer> Loading
packages/SystemUI/src/com/android/systemui/doze/DozeService.java +11 −2 Original line number Diff line number Diff line Loading @@ -88,6 +88,7 @@ public class DozeService extends DreamService { private boolean mPowerSaveActive; private boolean mCarMode; private long mNotificationPulseTime; private long mLastScheduleResetTime; private long mEarliestPulseDueToLight; private int mScheduleResetsRemaining; Loading Loading @@ -356,13 +357,21 @@ public class DozeService extends DreamService { return; } final long pulseDuration = mDozeParameters.getPulseDuration(false /*pickup*/); if ((notificationTimeMs - mNotificationPulseTime) < pulseDuration) { boolean pulseImmediately = System.currentTimeMillis() >= notificationTimeMs; if ((notificationTimeMs - mLastScheduleResetTime) >= pulseDuration) { mScheduleResetsRemaining--; mLastScheduleResetTime = notificationTimeMs; } else if (!pulseImmediately){ if (DEBUG) Log.d(mTag, "Recently updated, not resetting schedule"); return; } mScheduleResetsRemaining--; if (DEBUG) Log.d(mTag, "mScheduleResetsRemaining = " + mScheduleResetsRemaining); mNotificationPulseTime = notificationTimeMs; if (pulseImmediately) { DozeLog.traceNotificationPulse(0); requestPulse(DozeLog.PULSE_REASON_NOTIFICATION); } // schedule the rest of the pulses rescheduleNotificationPulse(true /*predicate*/); } Loading