diff options
author | Jeff Sharkey <jsharkey@google.com> | 2015-10-12 16:34:37 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-10-12 16:34:37 +0000 |
commit | fe9c950a49a9bcdb9e35f709a7d1fffad58aa414 (patch) | |
tree | 941ceafd1ea496b160f52843cc44c8185435e0a7 /services | |
parent | a03ecf7d7c8ff2844caf5feecc6d29f1f7346ff9 (diff) | |
parent | 5ded7af622539ded176f81951843c3c52c89a6d1 (diff) | |
download | frameworks_base-fe9c950a49a9bcdb9e35f709a7d1fffad58aa414.zip frameworks_base-fe9c950a49a9bcdb9e35f709a7d1fffad58aa414.tar.gz frameworks_base-fe9c950a49a9bcdb9e35f709a7d1fffad58aa414.tar.bz2 |
Merge "Fix parole scheduling bugs." into mnc-dr-dev
Diffstat (limited to 'services')
-rw-r--r-- | services/usage/java/com/android/server/usage/UsageStatsService.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/services/usage/java/com/android/server/usage/UsageStatsService.java b/services/usage/java/com/android/server/usage/UsageStatsService.java index 4146c1c..5ad796f 100644 --- a/services/usage/java/com/android/server/usage/UsageStatsService.java +++ b/services/usage/java/com/android/server/usage/UsageStatsService.java @@ -314,6 +314,8 @@ public class UsageStatsService extends SystemService implements mAppIdleParoled = paroled; if (DEBUG) Slog.d(TAG, "Changing paroled to " + mAppIdleParoled); if (paroled) { + postParoleEndTimeout(); + } else { mLastAppIdleParoledTime = checkAndGetTimeLocked(); postNextParoleTimeout(); } @@ -404,8 +406,6 @@ public class UsageStatsService extends SystemService implements if (timeSinceLastParole > mAppIdleParoleIntervalMillis) { if (DEBUG) Slog.d(TAG, "Crossed default parole interval"); setAppIdleParoled(true); - // Make sure it ends at some point - postParoleEndTimeout(); } else { if (DEBUG) Slog.d(TAG, "Not long enough to go to parole"); postNextParoleTimeout(); @@ -492,7 +492,6 @@ public class UsageStatsService extends SystemService implements if (!deviceIdle && timeSinceLastParole >= mAppIdleParoleIntervalMillis) { if (DEBUG) Slog.i(TAG, "Bringing idle apps out of inactive state due to deviceIdleMode=false"); - postNextParoleTimeout(); setAppIdleParoled(true); } else if (deviceIdle) { if (DEBUG) Slog.i(TAG, "Device idle, back to prison"); |