Merge "Remove UserUsageStatsService#userUnlocked."

This commit is contained in:
TreeHugger Robot
2019-11-23 01:55:39 +00:00
committed by Android (Google) Code Review
2 changed files with 2 additions and 6 deletions

View File

@@ -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;
}

View File

@@ -165,10 +165,6 @@ class UserUsageStatsService {
}
}
void userUnlocked(long currentTimeMillis) {
init(currentTimeMillis);
}
void userStopped() {
// Flush events to disk immediately to guarantee persistence.
persistActiveStats();