Loading services/core/java/com/android/server/locksettings/BiometricDeferredQueue.java +1 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import java.util.Set; public class BiometricDeferredQueue { private static final String TAG = "BiometricDeferredQueue"; @NonNull private final Context mContext; @NonNull private final SyntheticPasswordManager mSpManager; @NonNull private final Handler mHandler; @Nullable private FingerprintManager mFingerprintManager; Loading Loading @@ -131,9 +130,7 @@ public class BiometricDeferredQueue { mFaceResetLockoutTask = null; }; BiometricDeferredQueue(@NonNull Context context, @NonNull SyntheticPasswordManager spManager, @NonNull Handler handler) { mContext = context; BiometricDeferredQueue(@NonNull SyntheticPasswordManager spManager, @NonNull Handler handler) { mSpManager = spManager; mHandler = handler; mPendingResetLockoutsForFingerprint = new ArrayList<>(); Loading services/core/java/com/android/server/locksettings/LockSettingsService.java +19 −23 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.pm.UserInfo; import android.content.res.Resources; import android.database.ContentObserver; import android.database.sqlite.SQLiteDatabase; import android.hardware.authsecret.V1_0.IAuthSecret; Loading Loading @@ -238,7 +237,6 @@ public class LockSettingsService extends ILockSettings.Stub { @VisibleForTesting protected final SyntheticPasswordManager mSpManager; private final KeyStore mKeyStore; private final java.security.KeyStore mJavaKeyStore; private final RecoverableKeyStoreManager mRecoverableKeyStoreManager; private ManagedProfilePasswordCache mManagedProfilePasswordCache; Loading Loading @@ -570,7 +568,6 @@ public class LockSettingsService extends ILockSettings.Stub { protected LockSettingsService(Injector injector) { mInjector = injector; mContext = injector.getContext(); mKeyStore = injector.getKeyStore(); mJavaKeyStore = injector.getJavaKeyStore(); mRecoverableKeyStoreManager = injector.getRecoverableKeyStoreManager(); mHandler = injector.getHandler(injector.getServiceThread()); Loading @@ -595,7 +592,7 @@ public class LockSettingsService extends ILockSettings.Stub { mSpManager = injector.getSyntheticPasswordManager(mStorage); mManagedProfilePasswordCache = injector.getManagedProfilePasswordCache(mJavaKeyStore); mBiometricDeferredQueue = new BiometricDeferredQueue(mContext, mSpManager, mHandler); mBiometricDeferredQueue = new BiometricDeferredQueue(mSpManager, mHandler); mRebootEscrowManager = injector.getRebootEscrowManager(new RebootEscrowCallbacks(), mStorage); Loading Loading @@ -637,7 +634,6 @@ public class LockSettingsService extends ILockSettings.Stub { } private void showEncryptionNotificationForProfile(UserHandle user, String reason) { Resources r = mContext.getResources(); CharSequence title = getEncryptionNotificationTitle(); CharSequence message = getEncryptionNotificationMessage(); CharSequence detail = getEncryptionNotificationDetail(); Loading @@ -657,7 +653,7 @@ public class LockSettingsService extends ILockSettings.Stub { PendingIntent intent = PendingIntent.getActivity(mContext, 0, unlockIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED); Slog.d(TAG, String.format("showing encryption notification, user: %d; reason: %s", Slog.d(TAG, TextUtils.formatSimple("showing encryption notification, user: %d; reason: %s", user.getIdentifier(), reason)); showEncryptionNotification(user, title, message, detail, intent); Loading Loading @@ -839,7 +835,7 @@ public class LockSettingsService extends ILockSettings.Stub { if (mContext.checkCallingOrSelfPermission(PERMISSION) != PERMISSION_GRANTED) { EventLog.writeEvent(0x534e4554, "28251513", getCallingUid(), ""); // SafetyNet } checkWritePermission(UserHandle.USER_SYSTEM); checkWritePermission(); mHasSecureLockScreen = mContext.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN); Loading Loading @@ -979,7 +975,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } private final void checkWritePermission(int userId) { private final void checkWritePermission() { mContext.enforceCallingOrSelfPermission(PERMISSION, "LockSettingsWrite"); } Loading @@ -987,7 +983,7 @@ public class LockSettingsService extends ILockSettings.Stub { mContext.enforceCallingOrSelfPermission(PERMISSION, "LockSettingsRead"); } private final void checkPasswordHavePermission(int userId) { private final void checkPasswordHavePermission() { if (mContext.checkCallingOrSelfPermission(PERMISSION) != PERMISSION_GRANTED) { EventLog.writeEvent(0x534e4554, "28251513", getCallingUid(), ""); // SafetyNet } Loading Loading @@ -1056,7 +1052,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void setSeparateProfileChallengeEnabled(int userId, boolean enabled, LockscreenCredential profileUserPassword) { checkWritePermission(userId); checkWritePermission(); if (!mHasSecureLockScreen && profileUserPassword != null && profileUserPassword.getType() != CREDENTIAL_TYPE_NONE) { Loading Loading @@ -1103,19 +1099,19 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void setBoolean(String key, boolean value, int userId) { checkWritePermission(userId); checkWritePermission(); mStorage.setBoolean(key, value, userId); } @Override public void setLong(String key, long value, int userId) { checkWritePermission(userId); checkWritePermission(); mStorage.setLong(key, value, userId); } @Override public void setString(String key, String value, int userId) { checkWritePermission(userId); checkWritePermission(); mStorage.setString(key, value, userId); } Loading Loading @@ -1154,7 +1150,7 @@ public class LockSettingsService extends ILockSettings.Stub { */ @Override public int getCredentialType(int userId) { checkPasswordHavePermission(userId); checkPasswordHavePermission(); return getCredentialTypeInternal(userId); } Loading Loading @@ -1967,7 +1963,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void resetKeyStore(int userId) { checkWritePermission(userId); checkWritePermission(); if (DEBUG) Slog.v(TAG, "Reset keystore for user: " + userId); List<Integer> profileUserIds = new ArrayList<>(); List<LockscreenCredential> profileUserDecryptedPasswords = new ArrayList<>(); Loading Loading @@ -2275,7 +2271,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void requireStrongAuth(int strongAuthReason, int userId) { checkWritePermission(userId); checkWritePermission(); mStrongAuth.requireStrongAuth(strongAuthReason, userId); } Loading @@ -2293,7 +2289,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void userPresent(int userId) { checkWritePermission(userId); checkWritePermission(); mStrongAuth.reportUnlock(userId); } Loading Loading @@ -2321,9 +2317,9 @@ public class LockSettingsService extends ILockSettings.Stub { final int origPid = Binder.getCallingPid(); final int origUid = Binder.getCallingUid(); Slog.e(TAG, "Caller pid " + origPid + " Caller uid " + origUid); // The original identity is an opaque integer. final long origId = Binder.clearCallingIdentity(); Slog.e(TAG, "Caller pid " + origPid + " Caller uid " + origUid); try { final LockSettingsShellCommand command = new LockSettingsShellCommand(new LockPatternUtils(mContext), mContext, origPid, Loading Loading @@ -2847,7 +2843,7 @@ public class LockSettingsService extends ILockSettings.Stub { synchronized (mSpManager) { disableEscrowTokenOnNonManagedDevicesIfNeeded(userId); for (long handle : mSpManager.getPendingTokensForUser(userId)) { Slog.i(TAG, String.format("activateEscrowTokens: %x %d ", handle, userId)); Slog.i(TAG, TextUtils.formatSimple("activateEscrowTokens: %x %d ", handle, userId)); mSpManager.createTokenBasedProtector(handle, sp, userId); } } Loading Loading @@ -3008,14 +3004,14 @@ public class LockSettingsService extends ILockSettings.Stub { pw.println("User " + userId); pw.increaseIndent(); synchronized (mSpManager) { pw.println(String.format("LSKF-based SP protector ID: %x", pw.println(TextUtils.formatSimple("LSKF-based SP protector ID: %x", getCurrentLskfBasedProtectorId(userId))); pw.println(String.format("LSKF last changed: %s (previous protector: %x)", pw.println(TextUtils.formatSimple("LSKF last changed: %s (previous protector: %x)", timestampToString(getLong(LSKF_LAST_CHANGED_TIME_KEY, 0, userId)), getLong(PREV_LSKF_BASED_PROTECTOR_ID_KEY, 0, userId))); } try { pw.println(String.format("SID: %x", pw.println(TextUtils.formatSimple("SID: %x", getGateKeeperService().getSecureUserId(userId))); } catch (RemoteException e) { // ignore. Loading @@ -3026,7 +3022,7 @@ public class LockSettingsService extends ILockSettings.Stub { pw.println("CredentialType: " + credentialTypeToString( getCredentialTypeInternal(userId))); pw.println("SeparateChallenge: " + getSeparateProfileChallengeEnabledInternal(userId)); pw.println(String.format("Metrics: %s", pw.println(TextUtils.formatSimple("Metrics: %s", getUserPasswordMetrics(userId) != null ? "known" : "unknown")); pw.decreaseIndent(); } Loading services/core/java/com/android/server/locksettings/LockSettingsStorage.java +3 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.server.locksettings; import static android.content.Context.USER_SERVICE; import static android.text.TextUtils.formatSimple; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.internal.widget.LockPatternUtils.USER_FRP; Loading Loading @@ -437,7 +436,7 @@ class LockSettingsStorage { } private File getSyntheticPasswordStateFileForUser(int userId, long protectorId, String name) { String fileName = formatSimple("%016x.%s", protectorId, name); String fileName = TextUtils.formatSimple("%016x.%s", protectorId, name); return new File(getSyntheticPasswordDirectoryForUser(userId), fileName); } Loading Loading @@ -643,13 +642,13 @@ class LockSettingsStorage { final UserManager um = UserManager.get(mContext); for (UserInfo user : um.getUsers()) { File userPath = getSyntheticPasswordDirectoryForUser(user.id); pw.println(String.format("User %d [%s]:", user.id, userPath)); pw.println(TextUtils.formatSimple("User %d [%s]:", user.id, userPath)); pw.increaseIndent(); File[] files = userPath.listFiles(); if (files != null) { Arrays.sort(files); for (File file : files) { pw.println(String.format("%6d %s %s", file.length(), pw.println(TextUtils.formatSimple("%6d %s %s", file.length(), LockSettingsService.timestampToString(file.lastModified()), file.getName())); } Loading services/core/java/com/android/server/locksettings/PasswordSlotManager.java +0 −6 Original line number Diff line number Diff line Loading @@ -72,8 +72,6 @@ public class PasswordSlotManager { /** * Notify the manager of which slots are definitively in use by the current OS image. * * @throws RuntimeException */ public void refreshActiveSlots(Set<Integer> activeSlots) throws RuntimeException { if (mSlotMap == null) { Loading Loading @@ -103,8 +101,6 @@ public class PasswordSlotManager { /** * Mark the given slot as in use by the current OS image. * * @throws RuntimeException */ public void markSlotInUse(int slot) throws RuntimeException { ensureSlotMapLoaded(); Loading @@ -117,8 +113,6 @@ public class PasswordSlotManager { /** * Mark the given slot as no longer in use by the current OS image. * * @throws RuntimeException */ public void markSlotDeleted(int slot) throws RuntimeException { ensureSlotMapLoaded(); Loading services/core/java/com/android/server/locksettings/RebootEscrowKeyStoreManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ public class RebootEscrowKeyStoreManager { private SecretKey getKeyStoreEncryptionKeyLocked() { try { KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE_PROVIDER); KeyStore.LoadStoreParameter loadStoreParameter = null; // Load from the specific namespace if keystore2 is enabled. loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); KeyStore.LoadStoreParameter loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); keyStore.load(loadStoreParameter); return (SecretKey) keyStore.getKey(REBOOT_ESCROW_KEY_STORE_ENCRYPTION_KEY_NAME, null); Loading @@ -86,9 +86,9 @@ public class RebootEscrowKeyStoreManager { synchronized (mKeyStoreLock) { try { KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE_PROVIDER); KeyStore.LoadStoreParameter loadStoreParameter = null; // Load from the specific namespace if keystore2 is enabled. loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); KeyStore.LoadStoreParameter loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); keyStore.load(loadStoreParameter); keyStore.deleteEntry(REBOOT_ESCROW_KEY_STORE_ENCRYPTION_KEY_NAME); } catch (IOException | GeneralSecurityException e) { Loading Loading
services/core/java/com/android/server/locksettings/BiometricDeferredQueue.java +1 −4 Original line number Diff line number Diff line Loading @@ -44,7 +44,6 @@ import java.util.Set; public class BiometricDeferredQueue { private static final String TAG = "BiometricDeferredQueue"; @NonNull private final Context mContext; @NonNull private final SyntheticPasswordManager mSpManager; @NonNull private final Handler mHandler; @Nullable private FingerprintManager mFingerprintManager; Loading Loading @@ -131,9 +130,7 @@ public class BiometricDeferredQueue { mFaceResetLockoutTask = null; }; BiometricDeferredQueue(@NonNull Context context, @NonNull SyntheticPasswordManager spManager, @NonNull Handler handler) { mContext = context; BiometricDeferredQueue(@NonNull SyntheticPasswordManager spManager, @NonNull Handler handler) { mSpManager = spManager; mHandler = handler; mPendingResetLockoutsForFingerprint = new ArrayList<>(); Loading
services/core/java/com/android/server/locksettings/LockSettingsService.java +19 −23 Original line number Diff line number Diff line Loading @@ -67,7 +67,6 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; import android.content.pm.UserInfo; import android.content.res.Resources; import android.database.ContentObserver; import android.database.sqlite.SQLiteDatabase; import android.hardware.authsecret.V1_0.IAuthSecret; Loading Loading @@ -238,7 +237,6 @@ public class LockSettingsService extends ILockSettings.Stub { @VisibleForTesting protected final SyntheticPasswordManager mSpManager; private final KeyStore mKeyStore; private final java.security.KeyStore mJavaKeyStore; private final RecoverableKeyStoreManager mRecoverableKeyStoreManager; private ManagedProfilePasswordCache mManagedProfilePasswordCache; Loading Loading @@ -570,7 +568,6 @@ public class LockSettingsService extends ILockSettings.Stub { protected LockSettingsService(Injector injector) { mInjector = injector; mContext = injector.getContext(); mKeyStore = injector.getKeyStore(); mJavaKeyStore = injector.getJavaKeyStore(); mRecoverableKeyStoreManager = injector.getRecoverableKeyStoreManager(); mHandler = injector.getHandler(injector.getServiceThread()); Loading @@ -595,7 +592,7 @@ public class LockSettingsService extends ILockSettings.Stub { mSpManager = injector.getSyntheticPasswordManager(mStorage); mManagedProfilePasswordCache = injector.getManagedProfilePasswordCache(mJavaKeyStore); mBiometricDeferredQueue = new BiometricDeferredQueue(mContext, mSpManager, mHandler); mBiometricDeferredQueue = new BiometricDeferredQueue(mSpManager, mHandler); mRebootEscrowManager = injector.getRebootEscrowManager(new RebootEscrowCallbacks(), mStorage); Loading Loading @@ -637,7 +634,6 @@ public class LockSettingsService extends ILockSettings.Stub { } private void showEncryptionNotificationForProfile(UserHandle user, String reason) { Resources r = mContext.getResources(); CharSequence title = getEncryptionNotificationTitle(); CharSequence message = getEncryptionNotificationMessage(); CharSequence detail = getEncryptionNotificationDetail(); Loading @@ -657,7 +653,7 @@ public class LockSettingsService extends ILockSettings.Stub { PendingIntent intent = PendingIntent.getActivity(mContext, 0, unlockIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE_UNAUDITED); Slog.d(TAG, String.format("showing encryption notification, user: %d; reason: %s", Slog.d(TAG, TextUtils.formatSimple("showing encryption notification, user: %d; reason: %s", user.getIdentifier(), reason)); showEncryptionNotification(user, title, message, detail, intent); Loading Loading @@ -839,7 +835,7 @@ public class LockSettingsService extends ILockSettings.Stub { if (mContext.checkCallingOrSelfPermission(PERMISSION) != PERMISSION_GRANTED) { EventLog.writeEvent(0x534e4554, "28251513", getCallingUid(), ""); // SafetyNet } checkWritePermission(UserHandle.USER_SYSTEM); checkWritePermission(); mHasSecureLockScreen = mContext.getPackageManager() .hasSystemFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN); Loading Loading @@ -979,7 +975,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } private final void checkWritePermission(int userId) { private final void checkWritePermission() { mContext.enforceCallingOrSelfPermission(PERMISSION, "LockSettingsWrite"); } Loading @@ -987,7 +983,7 @@ public class LockSettingsService extends ILockSettings.Stub { mContext.enforceCallingOrSelfPermission(PERMISSION, "LockSettingsRead"); } private final void checkPasswordHavePermission(int userId) { private final void checkPasswordHavePermission() { if (mContext.checkCallingOrSelfPermission(PERMISSION) != PERMISSION_GRANTED) { EventLog.writeEvent(0x534e4554, "28251513", getCallingUid(), ""); // SafetyNet } Loading Loading @@ -1056,7 +1052,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void setSeparateProfileChallengeEnabled(int userId, boolean enabled, LockscreenCredential profileUserPassword) { checkWritePermission(userId); checkWritePermission(); if (!mHasSecureLockScreen && profileUserPassword != null && profileUserPassword.getType() != CREDENTIAL_TYPE_NONE) { Loading Loading @@ -1103,19 +1099,19 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void setBoolean(String key, boolean value, int userId) { checkWritePermission(userId); checkWritePermission(); mStorage.setBoolean(key, value, userId); } @Override public void setLong(String key, long value, int userId) { checkWritePermission(userId); checkWritePermission(); mStorage.setLong(key, value, userId); } @Override public void setString(String key, String value, int userId) { checkWritePermission(userId); checkWritePermission(); mStorage.setString(key, value, userId); } Loading Loading @@ -1154,7 +1150,7 @@ public class LockSettingsService extends ILockSettings.Stub { */ @Override public int getCredentialType(int userId) { checkPasswordHavePermission(userId); checkPasswordHavePermission(); return getCredentialTypeInternal(userId); } Loading Loading @@ -1967,7 +1963,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void resetKeyStore(int userId) { checkWritePermission(userId); checkWritePermission(); if (DEBUG) Slog.v(TAG, "Reset keystore for user: " + userId); List<Integer> profileUserIds = new ArrayList<>(); List<LockscreenCredential> profileUserDecryptedPasswords = new ArrayList<>(); Loading Loading @@ -2275,7 +2271,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void requireStrongAuth(int strongAuthReason, int userId) { checkWritePermission(userId); checkWritePermission(); mStrongAuth.requireStrongAuth(strongAuthReason, userId); } Loading @@ -2293,7 +2289,7 @@ public class LockSettingsService extends ILockSettings.Stub { @Override public void userPresent(int userId) { checkWritePermission(userId); checkWritePermission(); mStrongAuth.reportUnlock(userId); } Loading Loading @@ -2321,9 +2317,9 @@ public class LockSettingsService extends ILockSettings.Stub { final int origPid = Binder.getCallingPid(); final int origUid = Binder.getCallingUid(); Slog.e(TAG, "Caller pid " + origPid + " Caller uid " + origUid); // The original identity is an opaque integer. final long origId = Binder.clearCallingIdentity(); Slog.e(TAG, "Caller pid " + origPid + " Caller uid " + origUid); try { final LockSettingsShellCommand command = new LockSettingsShellCommand(new LockPatternUtils(mContext), mContext, origPid, Loading Loading @@ -2847,7 +2843,7 @@ public class LockSettingsService extends ILockSettings.Stub { synchronized (mSpManager) { disableEscrowTokenOnNonManagedDevicesIfNeeded(userId); for (long handle : mSpManager.getPendingTokensForUser(userId)) { Slog.i(TAG, String.format("activateEscrowTokens: %x %d ", handle, userId)); Slog.i(TAG, TextUtils.formatSimple("activateEscrowTokens: %x %d ", handle, userId)); mSpManager.createTokenBasedProtector(handle, sp, userId); } } Loading Loading @@ -3008,14 +3004,14 @@ public class LockSettingsService extends ILockSettings.Stub { pw.println("User " + userId); pw.increaseIndent(); synchronized (mSpManager) { pw.println(String.format("LSKF-based SP protector ID: %x", pw.println(TextUtils.formatSimple("LSKF-based SP protector ID: %x", getCurrentLskfBasedProtectorId(userId))); pw.println(String.format("LSKF last changed: %s (previous protector: %x)", pw.println(TextUtils.formatSimple("LSKF last changed: %s (previous protector: %x)", timestampToString(getLong(LSKF_LAST_CHANGED_TIME_KEY, 0, userId)), getLong(PREV_LSKF_BASED_PROTECTOR_ID_KEY, 0, userId))); } try { pw.println(String.format("SID: %x", pw.println(TextUtils.formatSimple("SID: %x", getGateKeeperService().getSecureUserId(userId))); } catch (RemoteException e) { // ignore. Loading @@ -3026,7 +3022,7 @@ public class LockSettingsService extends ILockSettings.Stub { pw.println("CredentialType: " + credentialTypeToString( getCredentialTypeInternal(userId))); pw.println("SeparateChallenge: " + getSeparateProfileChallengeEnabledInternal(userId)); pw.println(String.format("Metrics: %s", pw.println(TextUtils.formatSimple("Metrics: %s", getUserPasswordMetrics(userId) != null ? "known" : "unknown")); pw.decreaseIndent(); } Loading
services/core/java/com/android/server/locksettings/LockSettingsStorage.java +3 −4 Original line number Diff line number Diff line Loading @@ -17,7 +17,6 @@ package com.android.server.locksettings; import static android.content.Context.USER_SERVICE; import static android.text.TextUtils.formatSimple; import static com.android.internal.annotations.VisibleForTesting.Visibility.PACKAGE; import static com.android.internal.widget.LockPatternUtils.USER_FRP; Loading Loading @@ -437,7 +436,7 @@ class LockSettingsStorage { } private File getSyntheticPasswordStateFileForUser(int userId, long protectorId, String name) { String fileName = formatSimple("%016x.%s", protectorId, name); String fileName = TextUtils.formatSimple("%016x.%s", protectorId, name); return new File(getSyntheticPasswordDirectoryForUser(userId), fileName); } Loading Loading @@ -643,13 +642,13 @@ class LockSettingsStorage { final UserManager um = UserManager.get(mContext); for (UserInfo user : um.getUsers()) { File userPath = getSyntheticPasswordDirectoryForUser(user.id); pw.println(String.format("User %d [%s]:", user.id, userPath)); pw.println(TextUtils.formatSimple("User %d [%s]:", user.id, userPath)); pw.increaseIndent(); File[] files = userPath.listFiles(); if (files != null) { Arrays.sort(files); for (File file : files) { pw.println(String.format("%6d %s %s", file.length(), pw.println(TextUtils.formatSimple("%6d %s %s", file.length(), LockSettingsService.timestampToString(file.lastModified()), file.getName())); } Loading
services/core/java/com/android/server/locksettings/PasswordSlotManager.java +0 −6 Original line number Diff line number Diff line Loading @@ -72,8 +72,6 @@ public class PasswordSlotManager { /** * Notify the manager of which slots are definitively in use by the current OS image. * * @throws RuntimeException */ public void refreshActiveSlots(Set<Integer> activeSlots) throws RuntimeException { if (mSlotMap == null) { Loading Loading @@ -103,8 +101,6 @@ public class PasswordSlotManager { /** * Mark the given slot as in use by the current OS image. * * @throws RuntimeException */ public void markSlotInUse(int slot) throws RuntimeException { ensureSlotMapLoaded(); Loading @@ -117,8 +113,6 @@ public class PasswordSlotManager { /** * Mark the given slot as no longer in use by the current OS image. * * @throws RuntimeException */ public void markSlotDeleted(int slot) throws RuntimeException { ensureSlotMapLoaded(); Loading
services/core/java/com/android/server/locksettings/RebootEscrowKeyStoreManager.java +4 −4 Original line number Diff line number Diff line Loading @@ -64,9 +64,9 @@ public class RebootEscrowKeyStoreManager { private SecretKey getKeyStoreEncryptionKeyLocked() { try { KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE_PROVIDER); KeyStore.LoadStoreParameter loadStoreParameter = null; // Load from the specific namespace if keystore2 is enabled. loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); KeyStore.LoadStoreParameter loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); keyStore.load(loadStoreParameter); return (SecretKey) keyStore.getKey(REBOOT_ESCROW_KEY_STORE_ENCRYPTION_KEY_NAME, null); Loading @@ -86,9 +86,9 @@ public class RebootEscrowKeyStoreManager { synchronized (mKeyStoreLock) { try { KeyStore keyStore = KeyStore.getInstance(ANDROID_KEY_STORE_PROVIDER); KeyStore.LoadStoreParameter loadStoreParameter = null; // Load from the specific namespace if keystore2 is enabled. loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); KeyStore.LoadStoreParameter loadStoreParameter = new AndroidKeyStoreLoadStoreParameter(KEY_STORE_NAMESPACE); keyStore.load(loadStoreParameter); keyStore.deleteEntry(REBOOT_ESCROW_KEY_STORE_ENCRYPTION_KEY_NAME); } catch (IOException | GeneralSecurityException e) { Loading