summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2022-07-18 18:33:26 +0200
committercyBerta <cyberta@riseup.net>2022-07-18 18:33:26 +0200
commite9afdcda3e10c9cb86a39f4c1da1702e07597ef6 (patch)
tree8a6d5533758839667b80d991e1b590e692e00647
parentb9e1f2354520e37f0e2784f156f1288e55e1a993 (diff)
only allow already established network connections when trying to call the provider API
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/providersetup/ProviderAPI.java2
1 files changed, 1 insertions, 1 deletions
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) {