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

Commit 801a0341 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."

parents 451dee00 d1fb46c6
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -1009,8 +1009,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));
@@ -1018,6 +1021,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);