Revert "Avoid LockSettingsService NPE during CTS due to races around user removal."

This reverts commit e83f512553.

Reason for revert: http://b/125421639 was due to a bug in broadcasts which is now fixed.

Change-Id: I678d7721c948dadfbca8aca50183290438e7f451
This commit is contained in:
Irina Dumitrescu
2019-03-06 16:42:29 +00:00
parent e83f512553
commit d74fb7c93c

View File

@@ -1966,8 +1966,7 @@ public class LockSettingsService extends ILockSettings.Stub {
} catch (RemoteException ex) {
Slog.w(TAG, "unable to clear GK secure user id");
}
UserInfo userInfo = mUserManager.getUserInfo(userId);
if (unknownUser || userInfo == null || userInfo.isManagedProfile()) {
if (unknownUser || mUserManager.getUserInfo(userId).isManagedProfile()) {
removeKeystoreProfileKey(userId);
}
}