mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
more precise sms controls
// FREEBIE
This commit is contained in:
@@ -45,12 +45,35 @@ public class TextSecurePreferences {
|
||||
private static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
|
||||
|
||||
private static final String LOCAL_REGISTRATION_ID_PREF = "pref_local_registration_id";
|
||||
public static final String ALLOW_SMS_FALLBACK_PREF = "pref_allow_sms_traffic_out";
|
||||
private static final String ALLOW_SMS_FALLBACK_PREF = "pref_allow_sms_traffic_out";
|
||||
private static final String SMS_FALLBACK_ASK_PREF = "pref_sms_fallback_ask";
|
||||
private static final String ALLOW_SMS_NON_DATA_PREF = "pref_sms_non_data_out";
|
||||
|
||||
public static boolean isSmsFallbackEnabled(Context context) {
|
||||
return getBooleanPreference(context, ALLOW_SMS_FALLBACK_PREF, true);
|
||||
}
|
||||
|
||||
public static void setSmsFallbackEnabled(Context context, boolean enabled) {
|
||||
setBooleanPreference(context, ALLOW_SMS_FALLBACK_PREF, enabled);
|
||||
}
|
||||
|
||||
public static boolean isSmsNonDataOutEnabled(Context context) {
|
||||
return getBooleanPreference(context, ALLOW_SMS_NON_DATA_PREF, true);
|
||||
}
|
||||
|
||||
public static void setSmsNonDataOutEnabled(Context context, boolean enabled) {
|
||||
setBooleanPreference(context, ALLOW_SMS_NON_DATA_PREF, enabled);
|
||||
}
|
||||
|
||||
public static boolean isSmsFallbackAskEnabled(Context context) {
|
||||
return getBooleanPreference(context, SMS_FALLBACK_ASK_PREF, false);
|
||||
}
|
||||
|
||||
public static void setSmsFallbackAskEnabled(Context context, boolean enabled) {
|
||||
setBooleanPreference(context, SMS_FALLBACK_ASK_PREF, enabled);
|
||||
}
|
||||
|
||||
|
||||
public static int getLocalRegistrationId(Context context) {
|
||||
return getIntegerPreference(context, LOCAL_REGISTRATION_ID_PREF, 0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user