From e5d2c25ecf8aeaa1f1dee9215cb70b82a9f74d45 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Wed, 9 May 2018 11:05:44 -0700 Subject: 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 --- recovery.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'recovery.cpp') diff --git a/recovery.cpp b/recovery.cpp index b11298fb4..e427998a8 100644 --- a/recovery.cpp +++ b/recovery.cpp @@ -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); -- cgit v1.2.3