add an option to exclude the TWRP app

* Allow device maintainer to exclude the twrp app and disable
   the installation prompt. Mostly the app is useless for
   every unofficially supported devices.

 * BoardConfig flag: 'TW_EXCLUDE_TWRPAPP := true'

Original commit: https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/27694/

Change-Id: I0aa1fb2ebe03ceb19c766178544039a82497cdd4
This commit is contained in:
nailyk-fr
2017-08-08 21:23:35 +02:00
committed by Konsta
parent c0228607f3
commit e6b2d9fa71
6 changed files with 30 additions and 16 deletions

View File

@@ -934,11 +934,15 @@ void DataManager::SetDefaultValues()
mConst.SetValue("tw_app_installed_in_system", "0");
#else
mConst.SetValue("tw_oem_build", "0");
#ifdef TW_EXCLUDE_TWRPAPP
mConst.SetValue("tw_app_prompt", "-1");
#else
mPersist.SetValue("tw_app_prompt", "1");
mPersist.SetValue("tw_app_install_system", "1");
mData.SetValue("tw_app_install_status", "0"); // 0 = no status, 1 = not installed, 2 = already installed
mData.SetValue("tw_app_installed_in_system", "0");
#endif
#endif
#ifndef TW_EXCLUDE_NANO
mConst.SetValue("tw_include_nano", "1");
#else