Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9f1ae4dc authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am fe9c950a: Merge "Fix parole scheduling bugs." into mnc-dr-dev

* commit 'fe9c950a':
  Fix parole scheduling bugs.
parents 7f6d8754 fe9c950a
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -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");