advanced pref to use android emoji

// FREEBIE
This commit is contained in:
Jake McGinty
2015-09-07 13:11:40 -10:00
committed by Moxie Marlinspike
parent 551274f167
commit e077cc6581
7 changed files with 44 additions and 15 deletions

View File

@@ -88,6 +88,8 @@ public class TextSecurePreferences {
public static final String MEDIA_DOWNLOAD_WIFI_PREF = "pref_media_download_wifi";
public static final String MEDIA_DOWNLOAD_ROAMING_PREF = "pref_media_download_roaming";
public static final String SYSTEM_EMOJI_PREF = "pref_system_emoji";
public static NotificationPrivacyPreference getNotificationPrivacy(Context context) {
return new NotificationPrivacyPreference(getStringPreference(context, NOTIFICATION_PRIVACY_PREF, "all"));
}
@@ -447,6 +449,10 @@ public class TextSecurePreferences {
return Integer.parseInt(getStringPreference(context, THREAD_TRIM_LENGTH, "500"));
}
public static boolean isSystemEmojiPreferred(Context context) {
return getBooleanPreference(context, SYSTEM_EMOJI_PREF, false);
}
public static @NonNull Set<String> getMobileMediaDownloadAllowed(Context context) {
return getMediaDownloadAllowed(context, MEDIA_DOWNLOAD_MOBILE_PREF, R.array.pref_media_download_mobile_data_default);
}
@@ -465,7 +471,6 @@ public class TextSecurePreferences {
new HashSet<>(Arrays.asList(context.getResources().getStringArray(defaultValuesRes))));
}
public static void setBooleanPreference(Context context, String key, boolean value) {
PreferenceManager.getDefaultSharedPreferences(context).edit().putBoolean(key, value).apply();
}