Toggle MTP during ADB sideload

Windows does not do very well if you try to sideload while MTP is
enabled due to drivers. This will toggle MTP off and back on if
MTP is currently enabled before and after a sideload operation.

Change-Id: I022dbedecc97565b50b6ae1fda8922b822f63440
diff --git a/gui/action.cpp b/gui/action.cpp
index d72b331..27fd7a5 100644
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1268,6 +1268,7 @@
 				int wipe_dalvik = 0;
 
 				gui_print("Starting ADB sideload feature...\n");
+				bool mtp_was_enabled = TWFunc::Toggle_MTP(false);
 				DataManager::GetValue("tw_wipe_dalvik", wipe_dalvik);
 				ret = apply_from_adb("/");
 				DataManager::SetValue("tw_has_cancel", 0); // Remove cancel button from gui now that the zip install is going to start
@@ -1289,6 +1290,7 @@
 					set_usb_driver(false);
 					maybe_restart_adbd();
 				}
+				TWFunc::Toggle_MTP(mtp_was_enabled);
 				if (strcmp(file_prop, "error") != 0) {
 					struct stat st;
 					stat("/sideload/exit", &st);