summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2017-12-07 12:52:29 +0100
committerFup Duck <fupduck@sacknagel.com>2017-12-07 12:52:29 +0100
commitf8c2f76971f5a7f26d18e5e669d5e0ce9c560f3f (patch)
treeedd56030c03b259e147eba3af8987461874aedca /app/src/main/java/se/leap/bitmaskclient/StartActivity.java
parentda7293252f197e9b54c1abd8127b4abe45b95110 (diff)
Rename constants
* renamed last constants * remove unnecessary updates/ConstantUnification
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/StartActivity.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/StartActivity.java14
1 files changed, 5 insertions, 9 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
index ade43701..dd2be212 100644
--- a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
@@ -13,7 +13,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import de.blinkt.openvpn.core.VpnStatus;
-import se.leap.bitmaskclient.updates.ConstantUnification;
import se.leap.bitmaskclient.userstatus.User;
/**
@@ -113,15 +112,12 @@ public class StartActivity extends Activity {
}
/**
- * execute necessary updates for version change
+ * execute necessary upgrades for version change
*/
private void executeUpgrade() {
- if (passedMilestone(VersionMilestone.MULTIPLE_PROFILES)) {
+ if (hasNewFeature(FeatureVersionCode.MULTIPLE_PROFILES)) {
// TODO prepare usage of multiple profiles
}
- if (passedMilestone(VersionMilestone.CONSTANT_UNIFICATION)) {
- ConstantUnification.upgrade(preferences);
- }
// ensure all upgrades have passed before storing new information
preferences.edit().putInt(Constants.PREFERENCES_APP_VERSION, versionCode).apply();
@@ -129,11 +125,11 @@ public class StartActivity extends Activity {
/**
* check if an upgrade passed or moved to given milestone
- * @param milestone Version code of the Milestone VersionMilestone.MILE_STONE
+ * @param featureVersionCode Version code of the Milestone FeatureVersionCode.MILE_STONE
* @return true if milestone is reached - false otherwise
*/
- private boolean passedMilestone(int milestone) {
- return previousVersionCode < milestone && versionCode >= milestone;
+ private boolean hasNewFeature(int featureVersionCode) {
+ return previousVersionCode < featureVersionCode && versionCode >= featureVersionCode;
}
}