mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
advanced pref to use android emoji
// FREEBIE
This commit is contained in:
committed by
Moxie Marlinspike
parent
551274f167
commit
e077cc6581
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user