diff options
author | Robert Greenwalt <robdroid@android.com> | 2010-04-23 13:52:18 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-04-23 13:52:18 -0700 |
commit | b6c770e4e387bd73d4e7d4cbad99079b37f59043 (patch) | |
tree | 27943c6cf3c531de1d9cd3101f301e0fb8183294 /services | |
parent | dc14dc6d60675be688c333bbc60a315d2c658054 (diff) | |
parent | 0b2ebe9b45172b9147f86fd69eedb2a200982b68 (diff) | |
download | frameworks_base-b6c770e4e387bd73d4e7d4cbad99079b37f59043.zip frameworks_base-b6c770e4e387bd73d4e7d4cbad99079b37f59043.tar.gz frameworks_base-b6c770e4e387bd73d4e7d4cbad99079b37f59043.tar.bz2 |
am 0b2ebe9b: Merge "Respond to changes in throttle policy." into froyo
Merge commit '0b2ebe9b45172b9147f86fd69eedb2a200982b68' into froyo-plus-aosp
* commit '0b2ebe9b45172b9147f86fd69eedb2a200982b68':
Respond to changes in throttle policy.
Diffstat (limited to 'services')
-rw-r--r-- | services/java/com/android/server/ThrottleService.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/services/java/com/android/server/ThrottleService.java b/services/java/com/android/server/ThrottleService.java index 58a642e..2fe7420 100644 --- a/services/java/com/android/server/ThrottleService.java +++ b/services/java/com/android/server/ThrottleService.java @@ -391,6 +391,9 @@ public class ThrottleService extends IThrottleManager.Stub { ", resetDay=" + mPolicyResetDay + ", noteType=" + mPolicyNotificationsAllowedMask); + // force updates + mThrottleIndex = THROTTLE_INDEX_UNINITIALIZED; + onResetAlarm(); onPollAlarm(); @@ -490,6 +493,7 @@ public class ThrottleService extends IThrottleManager.Stub { } // 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 @@ -566,9 +570,9 @@ public class ThrottleService extends IThrottleManager.Stub { 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) { @@ -627,7 +631,6 @@ public class ThrottleService extends IThrottleManager.Stub { Calendar start = calculatePeriodStart(end); if (mRecorder.setNextPeriod(start, end)) { - clearThrottleAndNotification(); onPollAlarm(); } |