summaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-11-01 23:38:08 +0100
committercyBerta <cyberta@riseup.net>2019-11-01 23:38:08 +0100
commit433bdd35f59b5166d0f3c9b8807b2aa873ba2077 (patch)
treeb7b87ae3d61d5d8be9f434252791bcc3b16cc548 /app/src/main
parent87e4f382b6fc946c5f14002cacb19bec48323535 (diff)
unify error id between provider api service and eip service
Diffstat (limited to 'app/src/main')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java7
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/eip/EIP.java4
2 files changed, 5 insertions, 6 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java b/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java
index 5e3d8f73..4548e79e 100644
--- a/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java
+++ b/app/src/main/java/se/leap/bitmaskclient/MainActivityErrorDialog.java
@@ -32,11 +32,10 @@ import se.leap.bitmaskclient.eip.EipCommand;
import static se.leap.bitmaskclient.ProviderAPI.UPDATE_INVALID_VPN_CERTIFICATE;
import static se.leap.bitmaskclient.R.string.warning_option_try_ovpn;
import static se.leap.bitmaskclient.R.string.warning_option_try_pt;
-import static se.leap.bitmaskclient.eip.EIP.EIPErrors.ERROR_VPN_PREPARE;
import static se.leap.bitmaskclient.eip.EIP.EIPErrors.UNKNOWN;
import static se.leap.bitmaskclient.eip.EIP.EIPErrors.valueOf;
import static se.leap.bitmaskclient.eip.EIP.ERRORS;
-import static se.leap.bitmaskclient.eip.EIP.ERROR_ID;
+import static se.leap.bitmaskclient.eip.EIP.ERRORID;
import static se.leap.bitmaskclient.utils.PreferenceHelper.getUsePluggableTransports;
import static se.leap.bitmaskclient.utils.PreferenceHelper.usePluggableTransports;
@@ -88,8 +87,8 @@ public class MainActivityErrorDialog extends DialogFragment {
dialogFragment.reasonToFail = dialogFragment.getString(R.string.error_io_exception_user_message);
}
- if (errorJson.has(ERROR_ID)) {
- dialogFragment.downloadError = valueOf(errorJson.getString(ERROR_ID));
+ if (errorJson.has(ERRORID)) {
+ dialogFragment.downloadError = valueOf(errorJson.getString(ERRORID));
}
} catch (Exception e) {
e.printStackTrace();
diff --git a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
index e37305f2..63a2de0b 100644
--- a/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
+++ b/app/src/main/java/se/leap/bitmaskclient/eip/EIP.java
@@ -97,7 +97,7 @@ public final class EIP extends JobIntentService implements Observer {
public final static String TAG = EIP.class.getSimpleName(),
SERVICE_API_PATH = "config/eip-service.json",
ERRORS = "errors",
- ERROR_ID = "errorID";
+ ERRORID = "errorId";
private volatile SharedPreferences preferences;
private volatile EipStatus eipStatus;
@@ -353,7 +353,7 @@ public final class EIP extends JobIntentService implements Observer {
} else {
errorJson.put(ERRORS, getResources().getString(errorMessageId));
}
- errorJson.put(ERROR_ID, errorId);
+ errorJson.put(ERRORID, errorId);
} catch (JSONException e) {
e.printStackTrace();
}