recovery: Configure device menu based on runtime info.
Drop the dependency on build time flag of AB_OTA_UPDATER when compiling
device.cpp. Note that AB_OTA_UPDATER still guards the package install
behavior (install.cpp).
This can be extended to cover the entry of "Apply update from SD card".
Test: Build and boot into recovery on angler and walleye respectively.
Check the recovery menu.
Change-Id: I36a6a6b4101ba61d4d374e32353c36cc5716f9ce
This commit is contained in:
@@ -1182,6 +1182,10 @@ int start_recovery(int argc, char** argv) {
|
||||
}
|
||||
ui = device->GetUI();
|
||||
|
||||
if (!has_cache) {
|
||||
device->RemoveMenuItemForAction(Device::WIPE_CACHE);
|
||||
}
|
||||
|
||||
// Set background string to "installing security update" for security update,
|
||||
// otherwise set it to "installing system update".
|
||||
ui->SetSystemUpdateText(security_update);
|
||||
|
||||
Reference in New Issue
Block a user