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
diff --git a/device.h b/device.h
index bf148f5..9c43371 100644
--- a/device.h
+++ b/device.h
@@ -49,7 +49,7 @@
     RUN_LOCALE_TEST = 12,
   };
 
-  explicit Device(RecoveryUI* ui) : ui_(ui) {}
+  explicit Device(RecoveryUI* ui);
   virtual ~Device() {}
 
   // Returns a raw pointer to the RecoveryUI object.
@@ -96,6 +96,10 @@
   // here and return NO_ACTION.
   virtual BuiltinAction InvokeMenuItem(size_t menu_position);
 
+  // Removes the menu item for the given action. This allows tailoring the menu based on the
+  // runtime info, such as the availability of /cache or /sdcard.
+  virtual void RemoveMenuItemForAction(Device::BuiltinAction action);
+
   // Called before and after we do a wipe data/factory reset operation, either via a reboot from the
   // main system with the --wipe_data flag, or when the user boots into recovery image manually and
   // selects the option from the menu, to perform whatever device-specific wiping actions as needed.