mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Experience upgrade splash screen.
Behaves similarly to the DatabaseUpgradeActivity. You have a static list of ExperienceUpgrade models that include a "trigger" version, where when a user upgrades through it a notification will appear, and there will be a splash explanation screen. Right now the splash screens are basic and not too configurable, but that can be reworked as upgrades demand. Closes #4151
This commit is contained in:
committed by
Moxie Marlinspike
parent
0b20e99cd2
commit
3035dc4df9
@@ -44,6 +44,7 @@ public class TextSecurePreferences {
|
||||
public static final String ENABLE_MANUAL_MMS_PREF = "pref_enable_manual_mms";
|
||||
|
||||
private static final String LAST_VERSION_CODE_PREF = "last_version_code";
|
||||
private static final String LAST_EXPERIENCE_VERSION_PREF = "last_experience_version_code";
|
||||
public static final String RINGTONE_PREF = "pref_key_ringtone";
|
||||
private static final String VIBRATE_PREF = "pref_key_vibrate";
|
||||
private static final String NOTIFICATION_PREF = "pref_key_enable_notifications";
|
||||
@@ -342,7 +343,15 @@ public class TextSecurePreferences {
|
||||
if (!setIntegerPrefrenceBlocking(context, LAST_VERSION_CODE_PREF, versionCode)) {
|
||||
throw new IOException("couldn't write version code to sharedpreferences");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static int getLastExperienceVersionCode(Context context) {
|
||||
return getIntegerPreference(context, LAST_EXPERIENCE_VERSION_PREF, 0);
|
||||
}
|
||||
|
||||
public static void setLastExperienceVersionCode(Context context, int versionCode) {
|
||||
setIntegerPrefrence(context, LAST_EXPERIENCE_VERSION_PREF, versionCode);
|
||||
}
|
||||
|
||||
public static String getTheme(Context context) {
|
||||
return getStringPreference(context, THEME_PREF, "light");
|
||||
|
||||
Reference in New Issue
Block a user