Loading services/core/java/com/android/server/pm/UserManagerService.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -5519,6 +5519,13 @@ public class UserManagerService extends IUserManager.Stub { private void removeUserState(final @UserIdInt int userId) { private void removeUserState(final @UserIdInt int userId) { Slog.i(LOG_TAG, "Removing user state of user " + userId); Slog.i(LOG_TAG, "Removing user state of user " + userId); // Cleanup lock settings. This must happen before destroyUserKey(), since the user's DE // storage must still be accessible for the lock settings state to be properly cleaned up. mLockPatternUtils.removeUser(userId); // Evict and destroy the user's CE and DE encryption keys. At this point, the user's CE and // DE storage is made inaccessible, except to delete its contents. try { try { mContext.getSystemService(StorageManager.class).destroyUserKey(userId); mContext.getSystemService(StorageManager.class).destroyUserKey(userId); } catch (IllegalStateException e) { } catch (IllegalStateException e) { Loading @@ -5526,9 +5533,6 @@ public class UserManagerService extends IUserManager.Stub { Slog.i(LOG_TAG, "Destroying key for user " + userId + " failed, continuing anyway", e); Slog.i(LOG_TAG, "Destroying key for user " + userId + " failed, continuing anyway", e); } } // Cleanup lock settings mLockPatternUtils.removeUser(userId); // Cleanup package manager settings // Cleanup package manager settings mPm.cleanUpUser(this, userId); mPm.cleanUpUser(this, userId); Loading Loading
services/core/java/com/android/server/pm/UserManagerService.java +7 −3 Original line number Original line Diff line number Diff line Loading @@ -5519,6 +5519,13 @@ public class UserManagerService extends IUserManager.Stub { private void removeUserState(final @UserIdInt int userId) { private void removeUserState(final @UserIdInt int userId) { Slog.i(LOG_TAG, "Removing user state of user " + userId); Slog.i(LOG_TAG, "Removing user state of user " + userId); // Cleanup lock settings. This must happen before destroyUserKey(), since the user's DE // storage must still be accessible for the lock settings state to be properly cleaned up. mLockPatternUtils.removeUser(userId); // Evict and destroy the user's CE and DE encryption keys. At this point, the user's CE and // DE storage is made inaccessible, except to delete its contents. try { try { mContext.getSystemService(StorageManager.class).destroyUserKey(userId); mContext.getSystemService(StorageManager.class).destroyUserKey(userId); } catch (IllegalStateException e) { } catch (IllegalStateException e) { Loading @@ -5526,9 +5533,6 @@ public class UserManagerService extends IUserManager.Stub { Slog.i(LOG_TAG, "Destroying key for user " + userId + " failed, continuing anyway", e); Slog.i(LOG_TAG, "Destroying key for user " + userId + " failed, continuing anyway", e); } } // Cleanup lock settings mLockPatternUtils.removeUser(userId); // Cleanup package manager settings // Cleanup package manager settings mPm.cleanUpUser(this, userId); mPm.cleanUpUser(this, userId); Loading