Merge "Always ask vold to unlock user"

This commit is contained in:
Nikita Ioffe
2019-11-23 12:13:44 +00:00
committed by Gerrit Code Review

View File

@@ -2803,12 +2803,6 @@ class StorageManagerService extends IStorageManager.Stub
enforcePermission(android.Manifest.permission.STORAGE_INTERNAL);
if (StorageManager.isFileEncryptedNativeOrEmulated()) {
// When a user has secure lock screen, require secret to actually unlock.
// This check is mostly in place for emulation mode.
if (mLockPatternUtils.isSecure(userId) && ArrayUtils.isEmpty(secret)) {
throw new IllegalStateException("Secret required to unlock secure user " + userId);
}
try {
mVold.unlockUserKey(userId, serialNumber, encodeBytes(token),
encodeBytes(secret));