Check for root and root perms and offer to install/fix

Also fix sort order for file selector by date and file sizes

Change-Id: Idff9fe4232c19d4ed1082e78fabe6f921aa0a114
This commit is contained in:
Dees_Troy
2013-02-21 18:23:43 +00:00
committed by Dees_Troy
parent 4efe9c3c7d
commit 6ef6635ad3
21 changed files with 2039 additions and 146 deletions
+38 -18
View File
@@ -341,26 +341,16 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
DataManager::GetValue(TW_SIMULATE_ACTIONS, simulate);
if (function == "reboot")
{
//curtainClose(); this sometimes causes a crash
if (function == "reboot")
{
//curtainClose(); this sometimes causes a crash
sync();
sync();
DataManager::SetValue("tw_gui_done", 1);
DataManager::SetValue("tw_reboot_arg", arg);
if (arg == "recovery")
TWFunc::tw_reboot(rb_recovery);
else if (arg == "poweroff")
TWFunc::tw_reboot(rb_poweroff);
else if (arg == "bootloader")
TWFunc::tw_reboot(rb_bootloader);
else if (arg == "download")
TWFunc::tw_reboot(rb_download);
else
TWFunc::tw_reboot(rb_system);
// This should never occur
return -1;
}
return 0;
}
if (function == "home")
{
PageManager::SelectPackage("TWRP");
@@ -1143,6 +1133,36 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
}
}
}
if (function == "installsu")
{
int op_status = 0;
operation_start("Install SuperSU");
if (simulate) {
simulate_progress_bar();
} else {
if (!TWFunc::Install_SuperSU())
op_status = 1;
}
operation_end(op_status, simulate);
return 0;
}
if (function == "fixsu")
{
int op_status = 0;
operation_start("Fixing Superuser Permissions");
if (simulate) {
simulate_progress_bar();
} else {
if (!TWFunc::Fix_su_Perms())
op_status = 1;
}
operation_end(op_status, simulate);
return 0;
}
}
else
{