summaryrefslogtreecommitdiff
path: root/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
diff options
context:
space:
mode:
authorFup Duck <fupduck@sacknagel.com>2018-01-11 15:55:54 +0100
committerFup Duck <fupduck@sacknagel.com>2018-01-11 15:55:54 +0100
commitcf3e7cf082127519cd16bdf48bd1ccecf47579b9 (patch)
tree4c8a464acaae0bf8a330a8a7d040eb111b452508 /app/src/main/java/se/leap/bitmaskclient/StartActivity.java
parent68d6eb91436d0d145fd340056fd8000f7dd1ff34 (diff)
save app version on first start
Diffstat (limited to 'app/src/main/java/se/leap/bitmaskclient/StartActivity.java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/StartActivity.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
index 2bfe650a..ec972a75 100644
--- a/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
+++ b/app/src/main/java/se/leap/bitmaskclient/StartActivity.java
@@ -48,6 +48,7 @@ public class StartActivity extends Activity {
break;
case FIRST:
+ storeAppVersion();
// TODO start ProfileCreation & replace below code
break;
@@ -120,7 +121,7 @@ public class StartActivity extends Activity {
}
// ensure all upgrades have passed before storing new information
- preferences.edit().putInt(Constants.PREFERENCES_APP_VERSION, versionCode).apply();
+ storeAppVersion();
}
/**
@@ -132,4 +133,8 @@ public class StartActivity extends Activity {
return previousVersionCode < featureVersionCode && versionCode >= featureVersionCode;
}
+ private void storeAppVersion() {
+ preferences.edit().putInt(Constants.PREFERENCES_APP_VERSION, versionCode).apply();
+ }
+
}