From e9afdcda3e10c9cb86a39f4c1da1702e07597ef6 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 18 Jul 2022 18:33:26 +0200 Subject: only allow already established network connections when trying to call the provider API --- app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java index 063c9e00..cada516d 100644 --- a/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java +++ b/app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java @@ -162,7 +162,7 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) { NetworkInfo activeNetwork = cm.getActiveNetworkInfo(); return activeNetwork != null && - activeNetwork.isConnectedOrConnecting(); + activeNetwork.isConnected(); } else { NetworkCapabilities capabilities = cm.getNetworkCapabilities(cm.getActiveNetwork()); if (capabilities != null) { -- cgit v1.2.3