Skip to content

Commit 2ec7304

Browse files
authored
android: use onSuccess parameter in setWantRunning (#516)
Previously we were never actually invoking this parameter We previously weren't setting vpnActive after closing IPNService Updates tailscale/corp#22284 Signed-off-by: kari-ts <[email protected]>
1 parent 22de0cd commit 2ec7304

File tree

1 file changed

+2
-2
lines changed
  • android/src/main/java/com/tailscale/ipn

1 file changed

+2
-2
lines changed

android/src/main/java/com/tailscale/ipn/App.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class App : UninitializedApp(), libtailscale.AppContext, ViewModelStoreOwner {
7979

8080
override fun isPlayVersion(): Boolean = MaybeGoogle.isGoogle()
8181

82-
override fun shouldUseGoogleDNSFallback() : Boolean = BuildConfig.USE_GOOGLE_DNS_FALLBACK
82+
override fun shouldUseGoogleDNSFallback(): Boolean = BuildConfig.USE_GOOGLE_DNS_FALLBACK
8383

8484
override fun log(s: String, s1: String) {
8585
Log.d(s, s1)
@@ -160,7 +160,7 @@ class App : UninitializedApp(), libtailscale.AppContext, ViewModelStoreOwner {
160160
fun setWantRunning(wantRunning: Boolean, onSuccess: (() -> Unit)? = null) {
161161
val callback: (Result<Ipn.Prefs>) -> Unit = { result ->
162162
result.fold(
163-
onSuccess = {},
163+
onSuccess = { onSuccess?.invoke() },
164164
onFailure = { error ->
165165
Log.d("TAG", "Set want running: failed to update preferences: ${error.message}")
166166
})

0 commit comments

Comments
 (0)