Make fingerprint changes optionally non-blocking

Also complete the rename from "identity" to "safety numbers."

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2016-08-29 17:49:49 -07:00
parent 852634b294
commit 848a25664b
29 changed files with 331 additions and 121 deletions

View File

@@ -73,6 +73,7 @@ public class TextSecurePreferences {
private static final String SIGNALING_KEY_PREF = "pref_signaling_key";
private static final String DIRECTORY_FRESH_TIME_PREF = "pref_directory_refresh_time";
private static final String IN_THREAD_NOTIFICATION_PREF = "pref_key_inthread_notifications";
private static final String BLOCKING_IDENTITY_CHANGES_PREF = "pref_blocking_identity_changes";
private static final String LOCAL_REGISTRATION_ID_PREF = "pref_local_registration_id";
private static final String SIGNED_PREKEY_REGISTERED_PREF = "pref_signed_prekey_registered";
@@ -113,6 +114,14 @@ public class TextSecurePreferences {
return getBooleanPreference(context, MULTI_DEVICE_PROVISIONED_PREF, false);
}
public static boolean isBlockingIdentityUpdates(Context context) {
return getBooleanPreference(context, BLOCKING_IDENTITY_CHANGES_PREF, false);
}
public static void setBlockingIdentityUpdates(Context context, boolean value) {
setBooleanPreference(context, BLOCKING_IDENTITY_CHANGES_PREF, value);
}
public static NotificationPrivacyPreference getNotificationPrivacy(Context context) {
return new NotificationPrivacyPreference(getStringPreference(context, NOTIFICATION_PRIVACY_PREF, "all"));
}