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

Commit e78c205d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

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

parents 1693f176 a31610f2
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -975,8 +975,11 @@ public class AppStandbyController
                                    + standbyBucketToString(newBucket));
                        }
                    } else {
                        newBucket = getBucketForLocked(packageName, userId,
                                elapsedRealtime);
                        // Don't update the standby state for apps that were restored
                        if (!(oldMainReason == REASON_MAIN_DEFAULT
                                && (app.bucketingReason & REASON_SUB_MASK)
                                        == REASON_SUB_DEFAULT_APP_RESTORED)) {
                            newBucket = getBucketForLocked(packageName, userId, elapsedRealtime);
                            if (DEBUG) {
                                Slog.d(TAG, "Evaluated AOSP newBucket = "
                                        + standbyBucketToString(newBucket));
@@ -984,6 +987,7 @@ public class AppStandbyController
                            reason = REASON_MAIN_TIMEOUT;
                        }
                    }
                }

                // Check if the app is within one of the expiry times for forced bucket elevation
                final long elapsedTimeAdjusted = mAppIdleHistory.getElapsedTime(elapsedRealtime);