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

am: d12455daec

Change-Id: Ic3db718fc5f25bda2e67e6da3f64ea8a1b691901
This commit is contained in:
Pavel Grafov
2017-08-03 13:21:19 +00:00
committed by android-build-merger

View File

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