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

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

Merge "Remove UserUsageStatsService#userUnlocked."

parents 276b49f7 8958d5d0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -347,7 +347,7 @@ public class UsageStatsService extends SystemService implements
                Slog.i(TAG, "Attempted to unlock stopped or removed user " + userId);
                return;
            }
            userService.userUnlocked(System.currentTimeMillis());

            // Process all the pending reported events
            while (pendingEvents.peek() != null) {
                reportEvent(pendingEvents.poll(), userId);
@@ -466,6 +466,7 @@ public class UsageStatsService extends SystemService implements
            if (mUserUnlockedStates.get(userId)) {
                try {
                    service.init(currentTimeMillis);
                    mUserState.put(userId, service);
                } catch (Exception e) {
                    if (mUserManager.isUserUnlocked(userId)) {
                        throw e; // rethrow exception - user is unlocked
@@ -476,7 +477,6 @@ public class UsageStatsService extends SystemService implements
                    }
                }
            }
            mUserState.put(userId, service);
        }
        return service;
    }
+0 −4
Original line number Diff line number Diff line
@@ -165,10 +165,6 @@ class UserUsageStatsService {
        }
    }

    void userUnlocked(long currentTimeMillis) {
        init(currentTimeMillis);
    }

    void userStopped() {
        // Flush events to disk immediately to guarantee persistence.
        persistActiveStats();