summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-09-27 16:25:13 +0200
committercyBerta <cyberta@riseup.net>2019-09-27 16:25:13 +0200
commiteebba26668588d5e644441b0dbcc04eb9f9f3eac (patch)
tree9a400d21a6ae0b8c3aa029acf86263d3b94cff3f /app/src/main/java
parent91877ac8ed64927d14c0762cd4402e5ed736fab9 (diff)
fix error handling for failing fetch of eip-service.json in production flavor and minor refactorings
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java b/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java
index 37adbe93..26f1691c 100644
--- a/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java
+++ b/app/src/main/java/se/leap/bitmaskclient/ProviderApiManagerBase.java
@@ -750,6 +750,13 @@ public abstract class ProviderApiManagerBase {
return result;
}
+ protected Bundle setErrorResult(Bundle result, String stringJsonErrorMessage) {
+ String reasonToFail = pickErrorMessage(stringJsonErrorMessage);
+ result.putString(ERRORS, reasonToFail);
+ result.putBoolean(BROADCAST_RESULT_KEY, false);
+ return result;
+ }
+
Bundle setErrorResult(Bundle result, int errorMessageId, String errorId) {
JSONObject errorJson = new JSONObject();
String errorMessage = getProviderFormattedString(resources, errorMessageId);