Loading services/core/java/com/android/server/locksettings/LockSettingsService.java +0 −29 Original line number Diff line number Diff line Loading @@ -1688,10 +1688,6 @@ public class LockSettingsService extends ILockSettings.Stub { } private void onPostPasswordChanged(LockscreenCredential newCredential, int userHandle) { if (userHandle == UserHandle.USER_SYSTEM && isDeviceEncryptionEnabled() && shouldEncryptWithCredentials() && newCredential.isNone()) { setCredentialRequiredToDecrypt(false); } if (newCredential.isPattern()) { setBoolean(LockPatternUtils.PATTERN_EVER_CHOSEN_KEY, true, userHandle); } Loading Loading @@ -1769,24 +1765,6 @@ public class LockSettingsService extends ILockSettings.Stub { return mInjector.getDevicePolicyManager().getPasswordHistoryLength(null, userId); } private static boolean isDeviceEncryptionEnabled() { return StorageManager.isEncrypted(); } private boolean shouldEncryptWithCredentials() { return isCredentialRequiredToDecrypt() && !isDoNotAskCredentialsOnBootSet(); } private boolean isDoNotAskCredentialsOnBootSet() { return mInjector.getDevicePolicyManager().getDoNotAskCredentialsOnBoot(); } private boolean isCredentialRequiredToDecrypt() { final int value = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, -1); return value != 0; } private UserManager getUserManagerFromCache(int userId) { UserHandle userHandle = UserHandle.of(userId); if (mUserManagerCache.containsKey(userHandle)) { Loading @@ -1808,13 +1786,6 @@ public class LockSettingsService extends ILockSettings.Stub { return getUserManagerFromCache(userId).isCredentialSharableWithParent(); } private void setCredentialRequiredToDecrypt(boolean required) { if (isDeviceEncryptionEnabled()) { Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0); } } /** Register the given WeakEscrowTokenRemovedListener. */ @Override public boolean registerWeakEscrowTokenRemovedListener( Loading Loading
services/core/java/com/android/server/locksettings/LockSettingsService.java +0 −29 Original line number Diff line number Diff line Loading @@ -1688,10 +1688,6 @@ public class LockSettingsService extends ILockSettings.Stub { } private void onPostPasswordChanged(LockscreenCredential newCredential, int userHandle) { if (userHandle == UserHandle.USER_SYSTEM && isDeviceEncryptionEnabled() && shouldEncryptWithCredentials() && newCredential.isNone()) { setCredentialRequiredToDecrypt(false); } if (newCredential.isPattern()) { setBoolean(LockPatternUtils.PATTERN_EVER_CHOSEN_KEY, true, userHandle); } Loading Loading @@ -1769,24 +1765,6 @@ public class LockSettingsService extends ILockSettings.Stub { return mInjector.getDevicePolicyManager().getPasswordHistoryLength(null, userId); } private static boolean isDeviceEncryptionEnabled() { return StorageManager.isEncrypted(); } private boolean shouldEncryptWithCredentials() { return isCredentialRequiredToDecrypt() && !isDoNotAskCredentialsOnBootSet(); } private boolean isDoNotAskCredentialsOnBootSet() { return mInjector.getDevicePolicyManager().getDoNotAskCredentialsOnBoot(); } private boolean isCredentialRequiredToDecrypt() { final int value = Settings.Global.getInt(mContext.getContentResolver(), Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, -1); return value != 0; } private UserManager getUserManagerFromCache(int userId) { UserHandle userHandle = UserHandle.of(userId); if (mUserManagerCache.containsKey(userHandle)) { Loading @@ -1808,13 +1786,6 @@ public class LockSettingsService extends ILockSettings.Stub { return getUserManagerFromCache(userId).isCredentialSharableWithParent(); } private void setCredentialRequiredToDecrypt(boolean required) { if (isDeviceEncryptionEnabled()) { Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.REQUIRE_PASSWORD_TO_DECRYPT, required ? 1 : 0); } } /** Register the given WeakEscrowTokenRemovedListener. */ @Override public boolean registerWeakEscrowTokenRemovedListener( Loading