summaryrefslogtreecommitdiffstats
path: root/gui/action.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2014-09-03 00:59:01 +0200
committerbigbiff bigbiff <bigbiff@teamw.in>2014-09-03 03:44:49 +0200
commitc7eee6fef0263ed4eb5aa0d934a0a8c972d41b30 (patch)
treea994f2110aeeb58ef2bc1f23c31f695cd840ac46 /gui/action.cpp
parentFix derp (diff)
downloadandroid_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.tar
android_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.tar.gz
android_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.tar.bz2
android_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.tar.lz
android_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.tar.xz
android_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.tar.zst
android_bootable_recovery-c7eee6fef0263ed4eb5aa0d934a0a8c972d41b30.zip
Diffstat (limited to '')
-rw-r--r--gui/action.cpp27
1 files changed, 26 insertions, 1 deletions
diff --git a/gui/action.cpp b/gui/action.cpp
index c471533ef..7e432226e 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1305,7 +1305,6 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
} else {
ret = 1; // failure
}
- PartitionManager.Update_System_Details();
if (DataManager::GetIntValue(TW_HAS_INJECTTWRP) == 1 && DataManager::GetIntValue(TW_INJECT_AFTER_ZIP) == 1) {
operation_start("ReinjectTWRP");
gui_print("Injecting TWRP into boot image...\n");
@@ -1469,6 +1468,32 @@ int GUIAction::doAction(Action action, int isThreaded /* = 0 */)
operation_end(op_status, simulate);
return 0;
}
+ if (function == "startmtp")
+ {
+ int op_status = 0;
+
+ operation_start("Start MTP");
+ if (PartitionManager.Enable_MTP())
+ op_status = 0; // success
+ else
+ op_status = 1; // fail
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
+ if (function == "stopmtp")
+ {
+ int op_status = 0;
+
+ operation_start("Stop MTP");
+ if (PartitionManager.Disable_MTP())
+ op_status = 0; // success
+ else
+ op_status = 1; // fail
+
+ operation_end(op_status, simulate);
+ return 0;
+ }
}
else
{