action: Unmount vendor partition prior to switching slots

On some devices, having the vendor partition mounted makes
/vendor unable to be remounted after slot switching is done
Automatically unmount vendor partition prior to switching
slots to ensure /vendor is mountable afterwards

TEST: Mount vendor partition, then switch slots.
      Vendor partition should be unmounted when
      switching completes

[LinkBoi00] Adapt for android-9.0

Change-Id: Iac0a6ec0065256355778d319897f6ee10c8630df
diff --git a/gui/action.cpp b/gui/action.cpp
index b23fdeb..37534fa 100755
--- a/gui/action.cpp
+++ b/gui/action.cpp
@@ -1982,9 +1982,10 @@
 int GUIAction::setbootslot(std::string arg)
 {
 	operation_start("Set Boot Slot");
-	if (!simulate)
+	if (!simulate) {
+		PartitionManager.UnMount_By_Path("/vendor",true);
 		PartitionManager.Set_Active_Slot(arg);
-	else
+	} else
 		simulate_progress_bar();
 	operation_end(0);
 	return 0;