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

Commit 7950f77e authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Don't change bucketing reason if app is already in better bucket." into tm-dev

parents c5229086 55d482aa
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -328,11 +328,13 @@ public class AppIdleHistory {
            appUsageHistory.lastUsedScreenTime = getScreenOnTime(nowElapsedRealtimeMs);
        }

        if (appUsageHistory.currentBucket >= newBucket) {
            if (appUsageHistory.currentBucket > newBucket) {
                appUsageHistory.currentBucket = newBucket;
                logAppStandbyBucketChanged(packageName, userId, newBucket, bucketingReason);
            }
            appUsageHistory.bucketingReason = bucketingReason;
        }

        return appUsageHistory;
    }