Loading services/core/java/com/android/server/locksettings/LockSettingsService.java +8 −6 Original line number Diff line number Diff line Loading @@ -375,7 +375,7 @@ public class LockSettingsService extends ILockSettings.Stub { * @param profileUserId profile user Id * @param profileUserPassword profile original password (when it has separated lock). */ public void tieProfileLockIfNecessary(int profileUserId, private void tieProfileLockIfNecessary(int profileUserId, LockscreenCredential profileUserPassword) { if (DEBUG) Slog.v(TAG, "Check child profile lock for user: " + profileUserId); // Only for profiles that shares credential with parent Loading Loading @@ -713,7 +713,8 @@ public class LockSettingsService extends ILockSettings.Stub { userHandle); } public void onCleanupUser(int userId) { @VisibleForTesting void onCleanupUser(int userId) { hideEncryptionNotification(new UserHandle(userId)); // User is stopped with its CE key evicted. Restore strong auth requirement to the default // flags after boot since stopping and restarting a user later is equivalent to rebooting Loading @@ -725,7 +726,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } public void onStartUser(final int userId) { private void onStartUser(final int userId) { maybeShowEncryptionNotificationForUser(userId, "user started"); } Loading Loading @@ -779,7 +780,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } public void onUnlockUser(final int userId) { private void onUnlockUser(final int userId) { // Perform tasks which require locks in LSS on a handler, as we are callbacks from // ActivityManager.unlockUser() mHandler.post(new Runnable() { Loading Loading @@ -1222,7 +1223,7 @@ public class LockSettingsService extends ILockSettings.Stub { * {@link #CREDENTIAL_TYPE_PATTERN}, {@link #CREDENTIAL_TYPE_PIN} and * {@link #CREDENTIAL_TYPE_PASSWORD} */ public int getCredentialTypeInternal(int userId) { private int getCredentialTypeInternal(int userId) { if (userId == USER_FRP) { return getFrpCredentialType(); } Loading Loading @@ -1802,6 +1803,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } @VisibleForTesting /** Note: this method is overridden in unit tests */ protected boolean isCredentialSharableWithParent(int userId) { return getUserManagerFromCache(userId).isCredentialSharableWithParent(); } Loading Loading @@ -2560,7 +2562,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } protected synchronized IGateKeeperService getGateKeeperService() { private synchronized IGateKeeperService getGateKeeperService() { if (mGateKeeperService != null) { return mGateKeeperService; } Loading services/core/java/com/android/server/locksettings/LockSettingsStrongAuth.java +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.internal.widget.LockPatternUtils.StrongAuthTracker; /** * Keeps track of requests for strong authentication. */ @VisibleForTesting // public visibility is needed for Mockito public class LockSettingsStrongAuth { private static final String TAG = "LockSettings"; Loading services/core/java/com/android/server/locksettings/ManagedProfilePasswordCache.java +2 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.security.keystore.UserNotAuthenticatedException; import android.util.Slog; import android.util.SparseArray; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ArrayUtils; import com.android.internal.widget.LockscreenCredential; Loading Loading @@ -60,6 +61,7 @@ import javax.crypto.spec.GCMParameterSpec; * <p> The encrypted credential is stored in-memory only so the cache does not persist across * reboots. */ @VisibleForTesting // public visibility is needed for Mockito public class ManagedProfilePasswordCache { private static final String TAG = "ManagedProfilePasswordCache"; Loading services/core/java/com/android/server/locksettings/PasswordSlotManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ import java.util.Set; * If a /metadata partition does not exist, GSIs are not supported, and PasswordSlotManager will * simply not persist the slot mapping. */ public class PasswordSlotManager { class PasswordSlotManager { private static final String TAG = "PasswordSlotManager"; private static final String GSI_RUNNING_PROP = "ro.gsid.image_running"; Loading services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ import javax.crypto.SecretKey; import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.SecretKeySpec; public class SyntheticPasswordCrypto { class SyntheticPasswordCrypto { private static final String TAG = "SyntheticPasswordCrypto"; private static final int AES_GCM_KEY_SIZE = 32; // AES-256-GCM private static final int AES_GCM_IV_SIZE = 12; Loading Loading
services/core/java/com/android/server/locksettings/LockSettingsService.java +8 −6 Original line number Diff line number Diff line Loading @@ -375,7 +375,7 @@ public class LockSettingsService extends ILockSettings.Stub { * @param profileUserId profile user Id * @param profileUserPassword profile original password (when it has separated lock). */ public void tieProfileLockIfNecessary(int profileUserId, private void tieProfileLockIfNecessary(int profileUserId, LockscreenCredential profileUserPassword) { if (DEBUG) Slog.v(TAG, "Check child profile lock for user: " + profileUserId); // Only for profiles that shares credential with parent Loading Loading @@ -713,7 +713,8 @@ public class LockSettingsService extends ILockSettings.Stub { userHandle); } public void onCleanupUser(int userId) { @VisibleForTesting void onCleanupUser(int userId) { hideEncryptionNotification(new UserHandle(userId)); // User is stopped with its CE key evicted. Restore strong auth requirement to the default // flags after boot since stopping and restarting a user later is equivalent to rebooting Loading @@ -725,7 +726,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } public void onStartUser(final int userId) { private void onStartUser(final int userId) { maybeShowEncryptionNotificationForUser(userId, "user started"); } Loading Loading @@ -779,7 +780,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } public void onUnlockUser(final int userId) { private void onUnlockUser(final int userId) { // Perform tasks which require locks in LSS on a handler, as we are callbacks from // ActivityManager.unlockUser() mHandler.post(new Runnable() { Loading Loading @@ -1222,7 +1223,7 @@ public class LockSettingsService extends ILockSettings.Stub { * {@link #CREDENTIAL_TYPE_PATTERN}, {@link #CREDENTIAL_TYPE_PIN} and * {@link #CREDENTIAL_TYPE_PASSWORD} */ public int getCredentialTypeInternal(int userId) { private int getCredentialTypeInternal(int userId) { if (userId == USER_FRP) { return getFrpCredentialType(); } Loading Loading @@ -1802,6 +1803,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } @VisibleForTesting /** Note: this method is overridden in unit tests */ protected boolean isCredentialSharableWithParent(int userId) { return getUserManagerFromCache(userId).isCredentialSharableWithParent(); } Loading Loading @@ -2560,7 +2562,7 @@ public class LockSettingsService extends ILockSettings.Stub { } } protected synchronized IGateKeeperService getGateKeeperService() { private synchronized IGateKeeperService getGateKeeperService() { if (mGateKeeperService != null) { return mGateKeeperService; } Loading
services/core/java/com/android/server/locksettings/LockSettingsStrongAuth.java +1 −0 Original line number Diff line number Diff line Loading @@ -44,6 +44,7 @@ import com.android.internal.widget.LockPatternUtils.StrongAuthTracker; /** * Keeps track of requests for strong authentication. */ @VisibleForTesting // public visibility is needed for Mockito public class LockSettingsStrongAuth { private static final String TAG = "LockSettings"; Loading
services/core/java/com/android/server/locksettings/ManagedProfilePasswordCache.java +2 −0 Original line number Diff line number Diff line Loading @@ -26,6 +26,7 @@ import android.security.keystore.UserNotAuthenticatedException; import android.util.Slog; import android.util.SparseArray; import com.android.internal.annotations.VisibleForTesting; import com.android.internal.util.ArrayUtils; import com.android.internal.widget.LockscreenCredential; Loading Loading @@ -60,6 +61,7 @@ import javax.crypto.spec.GCMParameterSpec; * <p> The encrypted credential is stored in-memory only so the cache does not persist across * reboots. */ @VisibleForTesting // public visibility is needed for Mockito public class ManagedProfilePasswordCache { private static final String TAG = "ManagedProfilePasswordCache"; Loading
services/core/java/com/android/server/locksettings/PasswordSlotManager.java +1 −1 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ import java.util.Set; * If a /metadata partition does not exist, GSIs are not supported, and PasswordSlotManager will * simply not persist the slot mapping. */ public class PasswordSlotManager { class PasswordSlotManager { private static final String TAG = "PasswordSlotManager"; private static final String GSI_RUNNING_PROP = "ro.gsid.image_running"; Loading
services/core/java/com/android/server/locksettings/SyntheticPasswordCrypto.java +1 −1 Original line number Diff line number Diff line Loading @@ -49,7 +49,7 @@ import javax.crypto.SecretKey; import javax.crypto.spec.GCMParameterSpec; import javax.crypto.spec.SecretKeySpec; public class SyntheticPasswordCrypto { class SyntheticPasswordCrypto { private static final String TAG = "SyntheticPasswordCrypto"; private static final int AES_GCM_KEY_SIZE = 32; // AES-256-GCM private static final int AES_GCM_IV_SIZE = 12; Loading