aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTianjie Xu2017-09-20 19:53:46 -0500
committerTianjie Xu2017-09-27 02:27:38 -0500
commit29d5575fa877770f6387420294d9dc184a84a115 (patch)
treeb245d108a23ee6d630fd30046e4eea84057f88f4 /device.cpp
parent151f0820ace737c4af5da2954220e0642a3d6c02 (diff)
downloadplatform-bootable-recovery-29d5575fa877770f6387420294d9dc184a84a115.tar.gz
platform-bootable-recovery-29d5575fa877770f6387420294d9dc184a84a115.tar.xz
platform-bootable-recovery-29d5575fa877770f6387420294d9dc184a84a115.zip
Add a new option in recovery menu to test the background texts
Add a new option "Run locale test" to check the background text images (i.e. texts for "erasing", "error", "no_command" and "installing" with different locales.) Use volume up/down button to cycle through all the locales embedded in the png file, and power button to go back to recovery main menu. Test: Run locale test with bullhead. Change-Id: Ib16e119f372110cdb5e611ef497b0f9b9b418f51
Diffstat (limited to 'device.cpp')
-rw-r--r--device.cpp44
1 files changed, 23 insertions, 21 deletions
diff --git a/device.cpp b/device.cpp
index 61501869..f881daff 100644
--- a/device.cpp
+++ b/device.cpp
@@ -17,34 +17,36 @@
17#include "device.h" 17#include "device.h"
18 18
19static const char* MENU_ITEMS[] = { 19static const char* MENU_ITEMS[] = {
20 "Reboot system now", 20 "Reboot system now",
21 "Reboot to bootloader", 21 "Reboot to bootloader",
22 "Apply update from ADB", 22 "Apply update from ADB",
23 "Apply update from SD card", 23 "Apply update from SD card",
24 "Wipe data/factory reset", 24 "Wipe data/factory reset",
25#ifndef AB_OTA_UPDATER 25#ifndef AB_OTA_UPDATER
26 "Wipe cache partition", 26 "Wipe cache partition",
27#endif // !AB_OTA_UPDATER 27#endif // !AB_OTA_UPDATER
28 "Mount /system", 28 "Mount /system",
29 "View recovery logs", 29 "View recovery logs",
30 "Run graphics test", 30 "Run graphics test",
31 "Power off", 31 "Run locale test",
32 NULL, 32 "Power off",
33 nullptr,
33}; 34};
34 35
35static const Device::BuiltinAction MENU_ACTIONS[] = { 36static const Device::BuiltinAction MENU_ACTIONS[] = {
36 Device::REBOOT, 37 Device::REBOOT,
37 Device::REBOOT_BOOTLOADER, 38 Device::REBOOT_BOOTLOADER,
38 Device::APPLY_ADB_SIDELOAD, 39 Device::APPLY_ADB_SIDELOAD,
39 Device::APPLY_SDCARD, 40 Device::APPLY_SDCARD,
40 Device::WIPE_DATA, 41 Device::WIPE_DATA,
41#ifndef AB_OTA_UPDATER 42#ifndef AB_OTA_UPDATER
42 Device::WIPE_CACHE, 43 Device::WIPE_CACHE,
43#endif // !AB_OTA_UPDATER 44#endif // !AB_OTA_UPDATER
44 Device::MOUNT_SYSTEM, 45 Device::MOUNT_SYSTEM,
45 Device::VIEW_RECOVERY_LOGS, 46 Device::VIEW_RECOVERY_LOGS,
46 Device::RUN_GRAPHICS_TEST, 47 Device::RUN_GRAPHICS_TEST,
47 Device::SHUTDOWN, 48 Device::RUN_LOCALE_TEST,
49 Device::SHUTDOWN,
48}; 50};
49 51
50static_assert(sizeof(MENU_ITEMS) / sizeof(MENU_ITEMS[0]) == 52static_assert(sizeof(MENU_ITEMS) / sizeof(MENU_ITEMS[0]) ==