Always ask vold to unlock user
In case of runtime restarts or userspace reboot, CE might be preserved and user can be automatically unlocked. Test: adb reboot userspace Test: adb shell dumpsys activity Test: check that user 0 in in state RUNNING_UNLOCKED Test: adb shell 'kill -9 $(pidof system_server)' Test: check that user 0 in in state RUNNING_UNLOCKED Bug: 135984674 Change-Id: Ide280c67d6e9cc3141e3c3aae5ae8fa70252db4b
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user