Merge "Always clear password reset token when removing device owner" into udc-dev am: 65108620c4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/22938376 Change-Id: Ie30fd5fe6227e5a1c05e51f5dbaf99e25ef25553 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -10011,10 +10011,6 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
"clearDeviceOwner can only be called by the device owner");
|
||||
}
|
||||
enforceUserUnlocked(deviceOwnerUserId);
|
||||
DevicePolicyData policy = getUserData(deviceOwnerUserId);
|
||||
if (policy.mPasswordTokenHandle != 0) {
|
||||
mLockPatternUtils.removeEscrowToken(policy.mPasswordTokenHandle, deviceOwnerUserId);
|
||||
}
|
||||
|
||||
final ActiveAdmin admin = getDeviceOwnerAdminLocked();
|
||||
mInjector.binderWithCleanCallingIdentity(() -> {
|
||||
@@ -10069,6 +10065,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
}
|
||||
final DevicePolicyData policyData = getUserData(userId);
|
||||
policyData.mCurrentInputMethodSet = false;
|
||||
if (policyData.mPasswordTokenHandle != 0) {
|
||||
mLockPatternUtils.removeEscrowToken(policyData.mPasswordTokenHandle, userId);
|
||||
policyData.mPasswordTokenHandle = 0;
|
||||
}
|
||||
saveSettingsLocked(userId);
|
||||
mPolicyCache.onUserRemoved(userId);
|
||||
final DevicePolicyData systemPolicyData = getUserData(UserHandle.USER_SYSTEM);
|
||||
|
||||
Reference in New Issue
Block a user