Fix minor interface bug: No-SU prompt after no-OS prompt

When /system is wiped in TWRP and afterwards Reboot -> Recovery is selected the "No OS is installed, are you sure you want to reboot?" prompt appears. After swiping to "Reboot anyway" the "Current ROM is not rooted, do you wish to install SuperSU?" prompt appears.
This change removes "Do you wish to install SuperSU" prompt after "No OS installed" prompt.

Change-Id: Ie1157afdf5cf1cb81d6647269172d6e63af9f4b0
This commit is contained in:
Davis Mosenkovs
2015-09-26 13:48:23 -07:00
committed by Dees Troy
parent 7756859abe
commit b909aae78f
+1 -1
View File
@@ -371,7 +371,7 @@ int main(int argc, char **argv) {
TWFunc::Disable_Stock_Recovery_Replace();
// Check for su to see if the device is rooted or not
if (PartitionManager.Mount_By_Path("/system", false) && DataManager::GetIntValue("tw_mount_system_ro") == 0) {
if (TWFunc::Path_Exists("/supersu/su") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su")) {
if (TWFunc::Path_Exists("/supersu/su") && TWFunc::Path_Exists("/system/bin") && !TWFunc::Path_Exists("/system/bin/su") && !TWFunc::Path_Exists("/system/xbin/su") && !TWFunc::Path_Exists("/system/bin/.ext/.su")) {
// Device doesn't have su installed
DataManager::SetValue("tw_busy", 1);
if (gui_startPage("installsu", 1, 1) != 0) {