Do not call into vold when the device is not block encrypted

Previously the function checked if the device used FBE and returned
early when it did. This CL changes the function to check if the
devices uses block encryption and return early when it does not.

This is just to make the check more straightforward, and shouldn't
change existing devices' behavior.

Bug: 111653208
Test: manual
Change-Id: If61cb48ab2650d8d4c53d02622d550e190b5eb15
(cherry picked from commit 909d4c3510a9073bc332c0ce225c4b14a7fd2b38)
This commit is contained in:
yusukes
2018-07-23 17:34:42 -07:00
committed by Yusuke Sato
parent da241c5355
commit 14a8b1f326

View File

@@ -2624,8 +2624,8 @@ class StorageManagerService extends IStorageManager.Stub
mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
"no permission to access the crypt keeper");
if (StorageManager.isFileEncryptedNativeOnly()) {
// Not supported on FBE devices
if (!StorageManager.isBlockEncrypted()) {
// Only supported on FDE devices
return;
}
@@ -2648,8 +2648,8 @@ class StorageManagerService extends IStorageManager.Stub
mContext.enforceCallingOrSelfPermission(Manifest.permission.CRYPT_KEEPER,
"no permission to access the crypt keeper");
if (StorageManager.isFileEncryptedNativeOnly()) {
// Not supported on FBE devices
if (!StorageManager.isBlockEncrypted()) {
// Only supported on FDE devices
return null;
}