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

Commit 3ae99121 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20747643



Change-Id: I0f67f61cfd1d55be522a496b7b6f3cf354826ca5
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents ef6ab062 e78c205d
Loading
Loading
Loading
Loading
+10 −6
Original line number Original line Diff line number Diff line
@@ -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);