Merge "Small fixes for reset password token" into tm-dev

This commit is contained in:
Rubin Xu
2022-03-29 09:53:23 +00:00
committed by Android (Google) Code Review
2 changed files with 5 additions and 0 deletions

View File

@@ -3316,6 +3316,10 @@ public class LockSettingsService extends ILockSettings.Stub {
if (!mSpManager.hasEscrowData(userId)) {
throw new SecurityException("Escrow token is disabled on the current user");
}
if (!isEscrowTokenActive(tokenHandle, userId)) {
Slog.e(TAG, "Unknown or unactivated token: " + Long.toHexString(tokenHandle));
return false;
}
result = setLockCredentialWithTokenInternalLocked(
credential, tokenHandle, token, userId);
}

View File

@@ -661,6 +661,7 @@ class DevicePolicyData {
pw.println();
pw.increaseIndent();
pw.print("mPasswordOwner="); pw.println(mPasswordOwner);
pw.print("mPasswordTokenHandle="); pw.println(Long.toHexString(mPasswordTokenHandle));
pw.print("mUserControlDisabledPackages=");
pw.println(mUserControlDisabledPackages);
pw.print("mAppsSuspended="); pw.println(mAppsSuspended);