summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2020-07-24 10:20:22 -0700
committercyberta <cyberta@riseup.net>2020-07-24 10:20:22 -0700
commitbdd909d1faae569f27d61ad510d11fad74a5a27c (patch)
treec3266b79c930a6a902814e6c58c457280ed67c2a /app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java
parent4198c9b3bb1fee4bfcb3009ac9d80610ead13466 (diff)
parent38f5720502fda7b89ce204fe4afdffa67ac0ae82 (diff)
Merge branch 'support_geoip' into 'master'
Support geoip See merge request leap/bitmask_android!108
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java b/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java
index 9d34b38f..767e6a78 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderAPI.java
@@ -24,6 +24,7 @@ import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import androidx.core.app.JobIntentService;
import androidx.localbroadcastmanager.content.LocalBroadcastManager;
+
import static se.leap.bitmaskclient.Constants.SHARED_PREFERENCES;
/**
@@ -48,6 +49,7 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB
TAG = ProviderAPI.class.getSimpleName(),
SET_UP_PROVIDER = "setUpProvider",
UPDATE_PROVIDER_DETAILS = "updateProviderDetails",
+ DOWNLOAD_GEOIP_JSON = "downloadGeoIpJson",
SIGN_UP = "srpRegister",
LOG_IN = "srpAuth",
LOG_OUT = "logOut",
@@ -77,7 +79,9 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB
CORRECTLY_DOWNLOADED_EIP_SERVICE = 13,
INCORRECTLY_DOWNLOADED_EIP_SERVICE = 14,
CORRECTLY_UPDATED_INVALID_VPN_CERTIFICATE = 15,
- INCORRECTLY_UPDATED_INVALID_VPN_CERTIFICATE = 16;
+ INCORRECTLY_UPDATED_INVALID_VPN_CERTIFICATE = 16,
+ CORRECTLY_DOWNLOADED_GEOIP_JSON = 17,
+ INCORRECTLY_DOWNLOADED_GEOIP_JSON = 18;
ProviderApiManager providerApiManager;
@@ -99,11 +103,12 @@ public class ProviderAPI extends JobIntentService implements ProviderApiManagerB
*/
static void enqueueWork(Context context, Intent work) {
try {
- enqueueWork(context, ProviderAPI.class, JOB_ID, work);
+ ProviderAPI.enqueueWork(context, ProviderAPI.class, JOB_ID, work);
} catch (IllegalStateException e) {
e.printStackTrace();
}
}
+
@Override
protected void onHandleWork(@NonNull Intent command) {
providerApiManager.handleIntent(command);