Merge "Don't update the standby bucket for apps that were just restored." into tm-qpr-dev

This commit is contained in:
TreeHugger Robot
2022-12-15 21:00:45 +00:00
committed by Android (Google) Code Review

View File

@@ -975,8 +975,11 @@ public class AppStandbyController
+ standbyBucketToString(newBucket)); + standbyBucketToString(newBucket));
} }
} else { } else {
newBucket = getBucketForLocked(packageName, userId, // Don't update the standby state for apps that were restored
elapsedRealtime); if (!(oldMainReason == REASON_MAIN_DEFAULT
&& (app.bucketingReason & REASON_SUB_MASK)
== REASON_SUB_DEFAULT_APP_RESTORED)) {
newBucket = getBucketForLocked(packageName, userId, elapsedRealtime);
if (DEBUG) { if (DEBUG) {
Slog.d(TAG, "Evaluated AOSP newBucket = " Slog.d(TAG, "Evaluated AOSP newBucket = "
+ standbyBucketToString(newBucket)); + standbyBucketToString(newBucket));
@@ -984,6 +987,7 @@ public class AppStandbyController
reason = REASON_MAIN_TIMEOUT; reason = REASON_MAIN_TIMEOUT;
} }
} }
}
// Check if the app is within one of the expiry times for forced bucket elevation // Check if the app is within one of the expiry times for forced bucket elevation
final long elapsedTimeAdjusted = mAppIdleHistory.getElapsedTime(elapsedRealtime); final long elapsedTimeAdjusted = mAppIdleHistory.getElapsedTime(elapsedRealtime);