Block adoptable storage when using FBE.

For adoptable storage and FBE to coexist we need a new dm-biocrypt
kernel feature which isn't ready yet.  So for now, prevent devices
from being adopted on FBE devices.

Bug: 30770036
Change-Id: I47639209161ee403ce13ea9a60da235e97c3fc30
This commit is contained in:
Jeff Sharkey 2016-08-23 13:48:50 -06:00
parent dff8c727c1
commit 1571751109

View file

@ -21,6 +21,7 @@
#include "VolumeBase.h"
#include "VolumeManager.h"
#include "ResponseCode.h"
#include "Ext4Crypt.h"
#include <android-base/file.h>
#include <android-base/stringprintf.h>
@ -438,6 +439,11 @@ status_t Disk::partitionPrivate() {
status_t Disk::partitionMixed(int8_t ratio) {
int res;
if (e4crypt_is_native()) {
LOG(ERROR) << "Private volumes not yet supported on FBE devices";
return -EINVAL;
}
destroyAllVolumes();
mJustPartitioned = true;