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

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

Merge "Don't auto-create AppUsageHistory in getBucetExpiryTimeMs()." into tm-dev

parents 09e748be ee7af132
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -667,8 +667,8 @@ public class AppIdleHistory {
    long getBucketExpiryTimeMs(String packageName, int userId, int bucket, long elapsedRealtimeMs) {
        ArrayMap<String, AppUsageHistory> userHistory = getUserHistory(userId);
        AppUsageHistory appUsageHistory = getPackageHistory(userHistory, packageName,
                elapsedRealtimeMs, true);
        if (appUsageHistory.bucketExpiryTimesMs == null) {
                elapsedRealtimeMs, false /* create */);
        if (appUsageHistory == null || appUsageHistory.bucketExpiryTimesMs == null) {
            return 0;
        }
        return appUsageHistory.bucketExpiryTimesMs.get(bucket, 0);