From 8afd8d0722a337f06b20b6d58d59dd2bd25802b3 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 16 Dec 2022 02:24:50 +0100 Subject: compare mainURL instead of domain when checking if provider setup finished successfully --- .../bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java index cc6ff149..e6d6f981 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java @@ -62,7 +62,7 @@ public class ProviderApiSetupBroadcastReceiver extends BroadcastReceiver { Provider handledProvider = resultData.getParcelable(Constants.PROVIDER_KEY); if (handledProvider != null && setupInterface.getProvider() != null && - handledProvider.getDomain().equalsIgnoreCase(setupInterface.getProvider().getDomain())) { + handledProvider.getMainUrlString().equalsIgnoreCase(setupInterface.getProvider().getMainUrlString())) { switch (resultCode) { case ProviderAPI.PROVIDER_OK: setupInterface.handleProviderSetUp(handledProvider); -- cgit v1.2.3 From 9fdbdb38e076cdca75d7c58885a1769caf8ac6cc Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 16 Dec 2022 02:25:41 +0100 Subject: minor: make weak ref final --- .../bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java index e6d6f981..4b7d22fc 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderApiSetupBroadcastReceiver.java @@ -38,7 +38,7 @@ import se.leap.bitmaskclient.providersetup.activities.ProviderListBaseActivity; */ public class ProviderApiSetupBroadcastReceiver extends BroadcastReceiver { - private WeakReference setupInterfaceRef; + private final WeakReference setupInterfaceRef; public ProviderApiSetupBroadcastReceiver(ProviderSetupInterface setupInterface) { this.setupInterfaceRef = new WeakReference<>(setupInterface); -- cgit v1.2.3