Merge "Move key eviction past system services user cleanup." into oc-mr1-dev

This commit is contained in:
TreeHugger Robot
2017-08-03 12:59:57 +00:00
committed by Android (Google) Code Review

View File

@@ -671,12 +671,6 @@ final class UserController {
} }
if (stopped) { if (stopped) {
// Evict the user's credential encryption key
try {
getStorageManager().lockUserKey(userId);
} catch (RemoteException re) {
throw re.rethrowAsRuntimeException();
}
mInjector.systemServiceManagerCleanupUser(userId); mInjector.systemServiceManagerCleanupUser(userId);
synchronized (mLock) { synchronized (mLock) {
mInjector.getActivityStackSupervisor().removeUserLocked(userId); mInjector.getActivityStackSupervisor().removeUserLocked(userId);
@@ -685,6 +679,12 @@ final class UserController {
if (getUserInfo(userId).isEphemeral()) { if (getUserInfo(userId).isEphemeral()) {
mInjector.getUserManager().removeUser(userId); mInjector.getUserManager().removeUser(userId);
} }
// Evict the user's credential encryption key.
try {
getStorageManager().lockUserKey(userId);
} catch (RemoteException re) {
throw re.rethrowAsRuntimeException();
}
} }
} }