locksettings: only log FRP migration when actually done

Instead of logging "Migrated migrated_frp" when the FRP credential
migration is considered, which effectively means whenever the device
boots up for the first time (regardless of whether the migration
actually needed to be done or not), let's only log if the FRP credential
migration is actually being done.  Also make the message clearer.

Bug: 268526331
Change-Id: I8a46c90902da982eb684e49fb4afee19387621c3
This commit is contained in:
Eric Biggers
2023-02-27 19:20:41 +00:00
parent cacb0f37f6
commit 0b76af4d82
2 changed files with 1 additions and 1 deletions

View File

@@ -887,7 +887,6 @@ public class LockSettingsService extends ILockSettings.Stub {
&& !getBoolean("migrated_frp", false, 0)) {
migrateFrpCredential();
setBoolean("migrated_frp", true, 0);
Slog.i(TAG, "Migrated migrated_frp.");
}
}

View File

@@ -960,6 +960,7 @@ class SyntheticPasswordManager {
&& LockPatternUtils.userOwnsFrpCredential(mContext, userInfo)
&& getCredentialType(protectorId, userInfo.id) !=
LockPatternUtils.CREDENTIAL_TYPE_NONE) {
Slog.i(TAG, "Migrating FRP credential to persistent data block");
PasswordData pwd = PasswordData.fromBytes(loadState(PASSWORD_DATA_NAME, protectorId,
userInfo.id));
int weaverSlot = loadWeaverSlot(protectorId, userInfo.id);