From 64c5c0a9ba01f590d15bd0969d92d1473daf6600 Mon Sep 17 00:00:00 2001 From: Ethan Yonker Date: Mon, 6 Mar 2017 12:42:54 -0600 Subject: Add TWRP app install to landscape and watch themes Change-Id: Id48245218dc3ee3c6506521ce0134e6a579b6f4a --- gui/action.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gui/action.cpp') diff --git a/gui/action.cpp b/gui/action.cpp index 3899f5047..a39515828 100644 --- a/gui/action.cpp +++ b/gui/action.cpp @@ -1892,7 +1892,7 @@ int GUIAction::checkforapp(std::string arg __unused) LOGINFO("Unable to read sdk version from build prop\n"); else LOGINFO("SDK version too low for TWRP app (%i < 14)\n", sdkver); - DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed + DataManager::SetValue("tw_app_install_status", 1); // 0 = no status, 1 = not installed, 2 = already installed or do not install goto exit; } if (PartitionManager.Mount_By_Path("/system", false)) { @@ -1905,7 +1905,7 @@ int GUIAction::checkforapp(std::string arg __unused) install_path += "/twrpapp"; if (TWFunc::Path_Exists(install_path)) { LOGINFO("App found at '%s'\n", install_path.c_str()); - DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed + DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install goto exit; } } @@ -1920,11 +1920,14 @@ int GUIAction::checkforapp(std::string arg __unused) continue; closedir(d); LOGINFO("App found at '%s/%s'\n", parent_path, p->d_name); - DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed + DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install goto exit; } closedir(d); } + } else { + LOGINFO("Data partition cannot be mounted during app check\n"); + DataManager::SetValue("tw_app_install_status", 2); // 0 = no status, 1 = not installed, 2 = already installed or do not install } } else simulate_progress_bar(); -- cgit v1.2.3