diff options
Diffstat (limited to 'gui/action.cpp')
-rw-r--r-- | gui/action.cpp | 27 |
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 { |