Loading services/core/java/com/android/server/LockSettingsService.java +12 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ public class LockSettingsService extends ILockSettings.Stub { void setCredential(String credential, String savedCredential, int userId) throws RemoteException; byte[] toHash(String credential, int userId); String adjustForKeystore(String credential); } public LockSettingsService(Context context) { Loading Loading @@ -528,6 +529,11 @@ public class LockSettingsService extends ILockSettings.Stub { return LockPatternUtils.patternToHash( LockPatternUtils.stringToPattern(pattern)); } @Override public String adjustForKeystore(String pattern) { return LockPatternUtils.patternStringToBaseZero(pattern); } } ); Loading Loading @@ -568,6 +574,11 @@ public class LockSettingsService extends ILockSettings.Stub { public byte[] toHash(String password, int userId) { return mLockPatternUtils.passwordToHash(password, userId); } @Override public String adjustForKeystore(String password) { return password; } } ); } Loading @@ -587,7 +598,7 @@ public class LockSettingsService extends ILockSettings.Stub { if (storedHash.version == CredentialHash.VERSION_LEGACY) { byte[] hash = credentialUtil.toHash(credential, userId); if (Arrays.equals(hash, storedHash.hash)) { unlockKeystore(credential, userId); unlockKeystore(credentialUtil.adjustForKeystore(credential), userId); // migrate credential to GateKeeper credentialUtil.setCredential(credential, null, userId); if (!hasChallenge) { Loading Loading
services/core/java/com/android/server/LockSettingsService.java +12 −1 Original line number Diff line number Diff line Loading @@ -79,6 +79,7 @@ public class LockSettingsService extends ILockSettings.Stub { void setCredential(String credential, String savedCredential, int userId) throws RemoteException; byte[] toHash(String credential, int userId); String adjustForKeystore(String credential); } public LockSettingsService(Context context) { Loading Loading @@ -528,6 +529,11 @@ public class LockSettingsService extends ILockSettings.Stub { return LockPatternUtils.patternToHash( LockPatternUtils.stringToPattern(pattern)); } @Override public String adjustForKeystore(String pattern) { return LockPatternUtils.patternStringToBaseZero(pattern); } } ); Loading Loading @@ -568,6 +574,11 @@ public class LockSettingsService extends ILockSettings.Stub { public byte[] toHash(String password, int userId) { return mLockPatternUtils.passwordToHash(password, userId); } @Override public String adjustForKeystore(String password) { return password; } } ); } Loading @@ -587,7 +598,7 @@ public class LockSettingsService extends ILockSettings.Stub { if (storedHash.version == CredentialHash.VERSION_LEGACY) { byte[] hash = credentialUtil.toHash(credential, userId); if (Arrays.equals(hash, storedHash.hash)) { unlockKeystore(credential, userId); unlockKeystore(credentialUtil.adjustForKeystore(credential), userId); // migrate credential to GateKeeper credentialUtil.setCredential(credential, null, userId); if (!hasChallenge) { Loading