aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Astone <ales.astone@gmail.com>2019-03-29 17:16:56 +0100
committerMichael Bestas <mkbestas@lineageos.org>2019-04-05 02:12:01 +0300
commitb3552c5447961bee673472ca65155325a940f906 (patch)
treee83379ccdb7534480f320aa6179facca244b4257
parent8304e2354497e3755012f24f98344b9410910501 (diff)
downloadandroid_bootable_recovery-b3552c5447961bee673472ca65155325a940f906.tar.gz
android_bootable_recovery-b3552c5447961bee673472ca65155325a940f906.tar.bz2
android_bootable_recovery-b3552c5447961bee673472ca65155325a940f906.zip
recovery: only show tests in eng build
Change-Id: If783711ecd0d20728ec27ebc572b57e6d9bee760
-rw-r--r--Android.mk4
-rw-r--r--device.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/Android.mk b/Android.mk
index 2b62b441..5b3a2578 100644
--- a/Android.mk
+++ b/Android.mk
@@ -281,6 +281,10 @@ ifeq ($(BOARD_HAS_DOWNLOAD_MODE), true)
LOCAL_CFLAGS += -DDOWNLOAD_MODE
endif
+ifeq ($(TARGET_BUILD_VARIANT),eng)
+ LOCAL_CFLAGS += -DSHOW_TESTS
+endif
+
LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin
ifeq ($(TARGET_RECOVERY_UI_LIB),)
diff --git a/device.cpp b/device.cpp
index eeb3751c..7d3e11f1 100644
--- a/device.cpp
+++ b/device.cpp
@@ -75,8 +75,10 @@ static const MenuItem ADVANCED_MENU_ITEMS[] = {
MenuItem("Reboot to recovery"),
MenuItem("Mount system"),
MenuItem("View logs"),
+#ifdef SHOW_TESTS
MenuItem("Run graphics test"),
MenuItem("Run locale test"),
+#endif
MenuItem("Power off"),
};
static const MenuItemVector advanced_menu_items_ =
@@ -87,8 +89,10 @@ static const Device::BuiltinAction ADVANCED_MENU_ACTIONS[] = {
Device::REBOOT_RECOVERY,
Device::MOUNT_SYSTEM,
Device::VIEW_RECOVERY_LOGS,
+#ifdef SHOW_TESTS
Device::RUN_GRAPHICS_TEST,
Device::RUN_LOCALE_TEST,
+#endif
Device::SHUTDOWN,
};
static const Device::MenuActionVector advanced_menu_actions_ = Device::MenuActionVector(