}
static int process_config(VolumeManager *vm) {
+ bool has_adoptable = false;
char hardware[PROPERTY_VALUE_MAX];
property_get("ro.hardware", hardware, "");
std::string fstab_filename(StringPrintf("/fstab.%s", hardware));
if (fs_mgr_is_encryptable(&fstab->recs[i])) {
flags |= android::vold::Disk::Flags::kAdoptable;
+ has_adoptable = true;
}
if (fs_mgr_is_noemulatedsd(&fstab->recs[i])) {
flags |= android::vold::Disk::Flags::kDefaultPrimary;
new VolumeManager::DiskSource(sysPattern, nickname, flags)));
}
}
-
+ property_set("vold.has_adoptable", has_adoptable ? "1" : "0");
return 0;
}