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

am: 03515d0ad2

Change-Id: I206f33be06a993bcaef2fc68aa2c83bef80e6488
This commit is contained in:
Pavel Grafov
2017-08-03 13:10:49 +00:00
committed by android-build-merger

View File

@@ -671,12 +671,6 @@ final 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);
@@ -685,6 +679,12 @@ final 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();
}
}
}