summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/base/models
diff options
context:
space:
mode:
authorcyberta <cyberta@riseup.net>2022-07-18 21:57:07 +0000
committercyberta <cyberta@riseup.net>2022-07-18 21:57:07 +0000
commitabd8c8d06f01cc5b794a18779c2ea36b9317b4e3 (patch)
tree3bf4274594bc45c879093adbab58c2ec7a142146 /app/src/main/java/se/leap/bitmaskclient/base/models
parentf90e72fb3e90d561a433278f251ee27297b42001 (diff)
parent6ad47f6665312cfbc5c9b9e9bae1088d91b8dc99 (diff)
Merge branch 'eip-service.json_updates' into 'master'
Fix auto-check issues after successful connection attempt Closes #9093 See merge request leap/bitmask_android!197
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/base/models')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/base/models/Provider.java10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/base/models/Provider.java b/app/src/main/java/se/leap/bitmaskclient/base/models/Provider.java
index 974aef80..02a9694a 100644
--- a/app/src/main/java/se/leap/bitmaskclient/base/models/Provider.java
+++ b/app/src/main/java/se/leap/bitmaskclient/base/models/Provider.java
@@ -63,6 +63,7 @@ public final class Provider implements Parcelable {
private String vpnCertificate = "";
private long lastEipServiceUpdate = 0L;
private long lastGeoIpUpdate = 0L;
+ private boolean shouldUpdateVpnCertificate;
private boolean allowAnonymous;
private boolean allowRegistered;
@@ -361,6 +362,7 @@ public final class Provider implements Parcelable {
parcel.writeString(getVpnCertificate());
parcel.writeLong(lastEipServiceUpdate);
parcel.writeLong(lastGeoIpUpdate);
+ parcel.writeInt(shouldUpdateVpnCertificate ? 0 : 1);
}
@@ -407,6 +409,7 @@ public final class Provider implements Parcelable {
}
this.lastEipServiceUpdate = in.readLong();
this.lastGeoIpUpdate = in.readLong();
+ this.shouldUpdateVpnCertificate = in.readInt() == 0;
} catch (MalformedURLException | JSONException e) {
e.printStackTrace();
}
@@ -492,6 +495,13 @@ public final class Provider implements Parcelable {
return System.currentTimeMillis() - lastEipServiceUpdate >= EIP_SERVICE_TIMEOUT;
}
+ public void setShouldUpdateVpnCertificate(Boolean update) {
+ shouldUpdateVpnCertificate = update;
+ }
+
+ public boolean shouldUpdateVpnCertificate() {
+ return shouldUpdateVpnCertificate;
+ }
public void setLastGeoIpUpdate(long timestamp) {
lastGeoIpUpdate = timestamp;