diff options
author | cyBerta <cyberta@riseup.net> | 2024-04-24 10:22:13 +0200 |
---|---|---|
committer | cyBerta <cyberta@riseup.net> | 2024-04-24 10:22:13 +0200 |
commit | 19da621bebb11c1ca6723959e668ad0258929097 (patch) | |
tree | 6f9ee28f9d060d4d5ee42944f8771185d310f13b /app/src/main/java/se/leap/bitmaskclient/eip | |
parent | 2b91434f585e52fbfc229a50a36a04ef6cb8ce76 (diff) |
temporary workaround that stores provider setup updates if app is in background during setup. Fixes an app crash during provider setup while app is in background
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/eip')
-rw-r--r-- | app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java index ed95b75c..e96ded90 100644 --- a/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java +++ b/app/src/main/java/se/leap/bitmaskclient/eip/EipSetupObserver.java @@ -81,7 +81,6 @@ import se.leap.bitmaskclient.base.utils.PreferenceHelper; import se.leap.bitmaskclient.providersetup.ProviderAPI; import se.leap.bitmaskclient.providersetup.ProviderAPICommand; import se.leap.bitmaskclient.providersetup.ProviderSetupObservable; -import se.leap.bitmaskclient.providersetup.activities.SetupActivity; import se.leap.bitmaskclient.tor.TorServiceCommand; import se.leap.bitmaskclient.tor.TorStatusObservable; @@ -246,9 +245,7 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta //no break, continue with next case case CORRECTLY_DOWNLOADED_VPN_CERTIFICATE: if (ProviderSetupObservable.getProgress() > 0 && !activityForeground.get()) { - Intent activityIntent = new Intent(appContext, SetupActivity.class); - activityIntent.setAction(Intent.ACTION_MAIN); - appContext.startActivity(activityIntent); + ProviderSetupObservable.storeLastResult(resultCode, resultData); } break; case TOR_TIMEOUT: @@ -270,6 +267,8 @@ public class EipSetupObserver extends BroadcastReceiver implements VpnStatus.Sta for (EipSetupListener listener : listeners) { listener.handleProviderApiEvent(intent); } + + } private void maybeStartEipService(Bundle resultData) { |