Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 423f266f authored by Nikita Ioffe's avatar Nikita Ioffe Committed by Automerger Merge Worker
Browse files

Merge "Fix for TestDirectBootEmulated testcase" am: 0bd1e20d am: e69cdcc6...

Merge "Fix for TestDirectBootEmulated testcase" am: 0bd1e20d am: e69cdcc6 am: 0356d3a9 am: 74c7ba11

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559104

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iafe7cf689769a0d62edd12ce32cfd1faa5ec0373
parents b9cdb322 74c7ba11
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3136,6 +3136,12 @@ class StorageManagerService extends IStorageManager.Stub
        enforcePermission(android.Manifest.permission.STORAGE_INTERNAL);

        if (isFsEncrypted) {
            // When a user has secure lock screen, require secret to actually unlock.
            // This check is mostly in place for emulation mode.
            if (StorageManager.isFileEncryptedEmulatedOnly() &&
                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));