Commits
Ji Luo committed f874fb0d475
MA-16045 Fix sideload entry by hid devices Some virtual methods in class 'Device' can be overridden by vendor defined methods in class 'ImxDevice', but this kind of overridden will fail if the parameters of methods are changed. The parameter of InvokeMenuItem() has been changed on Android 10 and thus the default defination in 'bootable/recovery/recovery_ui/device.cpp' will be used, which returns incompatible action for the given chosen item and cause users can't enter sideload mode via "apply update from ADB". This CL corrects the parameter of InvokeMenuItem() in class 'ImxDevice' so correct action will be returned. Some unused methods are removed too. With above change, below build warnings can be fixed: device/fsl/common/recovery/recovery_ui.cpp:39:23: warning: 'ImxUI::CheckKey' hides overloaded virtual function[-Woverloaded-virtual] virtual KeyAction CheckKey(int key) { bootable/recovery/recovery_ui/include/recovery_ui/ui.h:133:21: note:hidden overloaded virtual function 'RecoveryUI::CheckKey'declared here: different number of parameters (2 vs 1) virtual KeyAction CheckKey(int key, bool is_long_press); device/fsl/common/recovery/recovery_ui.cpp:54:9: warning:'ImxDevice::HandleMenuKey' hides overloaded virtual function[-Woverloaded-virtual] int HandleMenuKey(int key_code, int visible) { bootable/recovery/recovery_ui/include/recovery_ui/device.h:96:15: note:hidden overloaded virtual function 'Device::HandleMenuKey'declared here: type mismatch at 2nd parameter ('bool' vs 'int') virtual int HandleMenuKey(int key, bool visible); device/fsl/common/recovery/recovery_ui.cpp:73:19: warning:'ImxDevice::InvokeMenuItem' hides overloaded virtual function[-Woverloaded-virtual] BuiltinAction InvokeMenuItem(int menu_position) { bootable/recovery/recovery_ui/include/recovery_ui/device.h:108:25:note: hidden overloaded virtual function'Device::InvokeMenuItem' declared here: type mismatch at 1st parameter ('size_t' (aka 'unsigned long') vs 'int') virtual BuiltinAction InvokeMenuItem(size_t menu_position); Test: Enter sideload update by pressing "apply update from ADB". Change-Id: Id5a119c11b777b3066d845aba72df985febeacf0 Signed-off-by: Ji Luo <ji.luo@nxp.com> Reviewed-on: http://androidsource.ap.freescale.net/project/10781 Reviewed-by: guoyin.chen <guoyin.chen@nxp.com> Reviewed-by: zhang sanshan <sanshan.zhang@nxp.com>