diff --git a/README.md b/README.md index e07206131e..b5c0d7020e 100644 --- a/README.md +++ b/README.md @@ -53,6 +53,8 @@ If you installed Android Studio the tools may not be in your path. To get the correct tool path, run `make androidpath` and export the provided path in your shell. +You will also need to run `make llibtailscale` to build the Tailscale AAR which is required to build the Android app. + #### Code Formatting The ktmft plugin on the default setting should be used to autoformat all Java, Kotlin diff --git a/android/build.gradle b/android/build.gradle index 8f64b3de8e..71d60435ea 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -85,6 +85,7 @@ android { buildConfigField "String", "GITHUB_2FA_SECRET", "\"" + getLocalProperty("github2FASecret", "")+"\"" } debug { + applicationIdSuffix ".debug" manifestPlaceholders.leanbackRequired = false } release { diff --git a/android/src/main/java/com/tailscale/ipn/QuickToggleService.java b/android/src/main/java/com/tailscale/ipn/QuickToggleService.java index f2374ccbf0..ecb4103810 100644 --- a/android/src/main/java/com/tailscale/ipn/QuickToggleService.java +++ b/android/src/main/java/com/tailscale/ipn/QuickToggleService.java @@ -97,6 +97,7 @@ private void onTileClick() { if (needsToStop) { app.stopVPN(); } else { + app.stopVPN(); app.startVPN(); } } diff --git a/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt b/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt index 49ab557f32..716a5f3527 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/viewModel/MainViewModel.kt @@ -210,6 +210,10 @@ class MainViewModel(private val appViewModel: AppViewModel) : IpnViewModel() { val currentState = Notifier.state.value if (desiredState) { + if (currentState != Ipn.State.Stopped) { + stopVPN() + } + // User wants to turn ON the VPN when { currentState != Ipn.State.Running -> startVPN()