Merge "Only note restrictions attempts for RESTRICTED bucket." into tm-dev

This commit is contained in:
TreeHugger Robot
2022-03-11 00:36:39 +00:00
committed by Android (Google) Code Review

View File

@@ -1575,8 +1575,10 @@ public class AppStandbyController
(reason & REASON_MAIN_MASK) == REASON_MAIN_FORCED_BY_SYSTEM;
if (app.currentBucket == newBucket && wasForcedBySystem && isForcedBySystem) {
mAppIdleHistory
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
if (newBucket == STANDBY_BUCKET_RESTRICTED) {
mAppIdleHistory
.noteRestrictionAttempt(packageName, userId, elapsedRealtime, reason);
}
// Keep track of all restricting reasons
reason = REASON_MAIN_FORCED_BY_SYSTEM
| (app.bucketingReason & REASON_SUB_MASK)