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

This commit is contained in:
TreeHugger Robot
2019-03-06 19:15:23 +00:00
committed by Android (Google) Code Review

View File

@@ -1973,8 +1973,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);
}
}