", resetDay=" + mPolicyResetDay + ", noteType=" +
mPolicyNotificationsAllowedMask);
+ // force updates
+ mThrottleIndex = THROTTLE_INDEX_UNINITIALIZED;
+
onResetAlarm();
onPollAlarm();
} // else already up!
} else {
+ clearThrottleAndNotification();
if ((mPolicyNotificationsAllowedMask & NOTIFICATION_WARNING) != 0) {
// check if we should warn about throttle
// pretend we only have 1/2 the time remaining that we actually do
Intent broadcast = new Intent(ThrottleManager.THROTTLE_ACTION);
broadcast.putExtra(ThrottleManager.EXTRA_THROTTLE_LEVEL, -1);
mContext.sendStickyBroadcast(broadcast);
+ mNotificationManager.cancel(R.drawable.stat_sys_throttled);
+ mWarningNotificationSent = false;
}
- mNotificationManager.cancel(R.drawable.stat_sys_throttled);
- mWarningNotificationSent = false;
}
private Calendar calculatePeriodEnd(long now) {
Calendar start = calculatePeriodStart(end);
if (mRecorder.setNextPeriod(start, end)) {
- clearThrottleAndNotification();
onPollAlarm();
}