From 83e82578af038e85cf75cf6675dc76120ec84860 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Fri, 4 Apr 2014 10:59:28 -0500 Subject: Allow building of an OEM friendly TWRP Disable theming Disable creating the TWRP folder for the settings file Change factory reset on data/media devices to a full wipe Change-Id: I3104282b5dd3f55dfff7c8cf39c72750af08563d --- gui/gui.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'gui/gui.cpp') diff --git a/gui/gui.cpp b/gui/gui.cpp index 912899f07..b3d4fe1a0 100644 --- a/gui/gui.cpp +++ b/gui/gui.cpp @@ -692,7 +692,7 @@ extern "C" int gui_loadResources(void) // unlink("/sdcard/video.last"); // rename("/sdcard/video.bin", "/sdcard/video.last"); // gRecorder = open("/sdcard/video.bin", O_CREAT | O_WRONLY); - +#ifndef TW_OEM_BUILD int check = 0; DataManager::GetValue(TW_IS_ENCRYPTED, check); if (check) @@ -731,14 +731,16 @@ extern "C" int gui_loadResources(void) theme_path += "/TWRP/theme/ui.zip"; if (check || PageManager::LoadPackage("TWRP", theme_path, "main")) { +#endif // ifndef TW_OEM_BUILD if (PageManager::LoadPackage("TWRP", "/res/ui.xml", "main")) { LOGERR("Failed to load base packages.\n"); goto error; } +#ifndef TW_OEM_BUILD } } - +#endif // ifndef TW_OEM_BUILD // Set the default package PageManager::SelectPackage("TWRP"); @@ -746,7 +748,7 @@ extern "C" int gui_loadResources(void) return 0; error: - LOGERR("An internal error has occurred.\n"); + LOGERR("An internal error has occurred: unable to load theme.\n"); gGuiInitialized = 0; return -1; } -- cgit v1.2.3