app crash if setup activity is in backgroudn during provider setup
01fc077b introduces an app crash, because we're trying to start an Activty without the FLAG_ACTIVITY_NEW_TASK flag outside of an Activity context.
Moreover Android restricts how to start activities if the app is in background from Android 10 upwards. see https://developer.android.com/guide/components/activities/background-starts
related crash from the google console:
Exception android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity (ContextImpl.java:1104)
at android.app.ContextImpl.startActivity (ContextImpl.java:1080)
at android.content.ContextWrapper.startActivity (ContextWrapper.java:442)
at se.leap.bitmaskclient.eip.EipSetupObserver.handleProviderApiEvent (EipSetupObserver.java:251)
at se.leap.bitmaskclient.eip.EipSetupObserver.onReceive (EipSetupObserver.java:164)
at androidx.localbroadcastmanager.content.LocalBroadcastManager.executePendingBroadcasts (LocalBroadcastManager.java:319)
at androidx.localbroadcastmanager.content.LocalBroadcastManager$1.handleMessage (LocalBroadcastManager.java:127)
at android.os.Handler.dispatchMessage (Handler.java:106)
at android.os.Looper.loopOnce (Looper.java:240)
at android.os.Looper.loop (Looper.java:351)
at android.app.ActivityThread.main (ActivityThread.java:8377)
at java.lang.reflect.Method.invoke
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1013)