diff --git a/ApkManager/AdbWindow.xaml.cs b/ApkManager/AdbWindow.xaml.cs index c9af85b..e1d2448 100644 --- a/ApkManager/AdbWindow.xaml.cs +++ b/ApkManager/AdbWindow.xaml.cs @@ -239,8 +239,8 @@ private void ShowActionMenu(ShowMenu menu) gbAction.Header = "Action : Install"; gbCommand.Visibility = Visibility.Visible; - if (cfg.AutoInstall()) - ButtonActionInstall_Click(null, null); + if (!cfg.AutoInstall()) return; + ButtonActionInstall_Click(null, null); } else if (menu == ShowMenu.Uninstall) { @@ -256,6 +256,9 @@ private void ShowActionMenu(ShowMenu menu) gbTarget.IsEnabled = false; gbAction.Header = "Action : Uninstall"; gbCommand.Visibility = Visibility.Visible; + + if (!cfg.AutoUninstall()) return; + ButtonActionUninstall_Click(null, null); } else { diff --git a/ApkManager/Lib/Adb.cs b/ApkManager/Lib/Adb.cs index 586ae3f..9100101 100644 --- a/ApkManager/Lib/Adb.cs +++ b/ApkManager/Lib/Adb.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; @@ -216,12 +216,12 @@ public async Task IsDeviceOnline(string device) } catch (Exception e) { - Debug.Print("Adb.Uninstall: {0}", e.Message); + Debug.Print("Adb.IsDeviceOnline: {0}", e.Message); return false; } finally { - OVERRIDE_ONREPORTEVENT = true; + OVERRIDE_ONREPORTEVENT = false; } }