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:
Tao Bao
2018-05-10 20:46:46 -07:00
parent 797550fb8b
commit e5d2c25ecf
4 changed files with 47 additions and 45 deletions
+4
View File
@@ -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);