From 999c6f235755025c4c07e5c320034460bbbd63f2 Mon Sep 17 00:00:00 2001 From: kari-ts <135075563+kari-ts@users.noreply.github.com> Date: Fri, 17 May 2024 11:02:07 -0700 Subject: [PATCH] Notifier: init app if uninitialized (#404) Fixes tailscale/corp#20087 Signed-off-by: kari-ts --- .../src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt b/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt index 5025c1a..4184a22 100644 --- a/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt +++ b/android/src/main/java/com/tailscale/ipn/ui/notifier/Notifier.kt @@ -4,6 +4,7 @@ package com.tailscale.ipn.ui.notifier import android.util.Log +import com.tailscale.ipn.App import com.tailscale.ipn.ui.model.Empty import com.tailscale.ipn.ui.model.Ipn import com.tailscale.ipn.ui.model.Ipn.Notify @@ -56,6 +57,9 @@ object Notifier { @OptIn(ExperimentalSerializationApi::class) fun start(scope: CoroutineScope) { Log.d(TAG, "Starting") + if (!::app.isInitialized) { + App.get() + } scope.launch(Dispatchers.IO) { val mask = NotifyWatchOpt.Netmap.value or