recovery: allow opting-in to fastbootd

Change-Id: Id8228c0782f4520779d3a2116ea11015b64c13c3
This commit is contained in:
Alessandro Astone 2020-02-26 17:25:54 +01:00 committed by zlewchan
parent 8d10568ac6
commit c6947be5f1
2 changed files with 6 additions and 3 deletions

View file

@ -409,7 +409,8 @@ int main(int argc, char** argv) {
} else if (option == "reason") {
reason = optarg;
} else if (option == "fastboot" &&
android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) {
(android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) ||
android::base::GetBoolProperty("ro.fastbootd.available", false))) {
fastboot = true;
}
break;
@ -473,7 +474,8 @@ int main(int argc, char** argv) {
device->RemoveMenuItemForAction(Device::WIPE_CACHE);
}
if (!android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) {
if (!android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) &&
!android::base::GetBoolProperty("ro.fastbootd.available", false)) {
device->RemoveMenuItemForAction(Device::ENTER_FASTBOOT);
}

View file

@ -950,7 +950,8 @@ bool ScreenRecoveryUI::Init(const std::string& locale) {
no_command_text_ = LoadLocalizedBitmap("no_command_text");
error_text_ = LoadLocalizedBitmap("error_text");
if (android::base::GetBoolProperty("ro.boot.dynamic_partitions", false)) {
if (android::base::GetBoolProperty("ro.boot.dynamic_partitions", false) ||
android::base::GetBoolProperty("ro.fastbootd.available", false)) {
fastbootd_logo_ = LoadBitmap("fastbootd");
}