Remove Message Requests feature flag.

This commit is contained in:
Greyson Parrelli
2020-06-16 07:37:27 -07:00
committed by Greyson Parrelli
parent f2fe81d9b5
commit 3d7cffef2b
36 changed files with 81 additions and 285 deletions

View File

@@ -50,7 +50,6 @@ public final class FeatureFlags {
private static final long FETCH_INTERVAL = TimeUnit.HOURS.toMillis(2);
private static final String UUIDS = "android.uuids";
private static final String MESSAGE_REQUESTS = "android.messageRequests";
private static final String USERNAMES = "android.usernames";
private static final String PINS_FOR_ALL_MANDATORY = "android.pinsForAllMandatory";
private static final String PINS_MEGAPHONE_KILL_SWITCH = "android.pinsMegaphoneKillSwitch";
@@ -75,7 +74,6 @@ public final class FeatureFlags {
PINS_FOR_ALL_MANDATORY,
PINS_MEGAPHONE_KILL_SWITCH,
PROFILE_NAMES_MEGAPHONE,
MESSAGE_REQUESTS,
ATTACHMENTS_V3,
REMOTE_DELETE,
PROFILE_FOR_CALLING,
@@ -130,7 +128,6 @@ public final class FeatureFlags {
* desired test state.
*/
private static final Map<String, OnFlagChange> FLAG_CHANGE_LISTENERS = new HashMap<String, OnFlagChange>() {{
put(MESSAGE_REQUESTS, (change) -> SignalStore.misc().setMessageRequestEnableTime(change == Change.ENABLED ? System.currentTimeMillis() : 0));
put(VERSIONED_PROFILES, (change) -> {
if (change == Change.ENABLED) {
ApplicationDependencies.getJobManager().add(new ProfileUploadJob());
@@ -195,16 +192,6 @@ public final class FeatureFlags {
return getBoolean(UUIDS, false);
}
/** Favoring profile names when displaying contacts. */
public static synchronized boolean profileDisplay() {
return messageRequests();
}
/** MessageRequest stuff */
public static synchronized boolean messageRequests() {
return getBoolean(MESSAGE_REQUESTS, false);
}
/** Creating usernames, sending messages by username. Requires {@link #uuids()}. */
public static synchronized boolean usernames() {
boolean value = getBoolean(USERNAMES, false);
@@ -240,7 +227,7 @@ public final class FeatureFlags {
/** Whether or not profile sharing is required for calling */
public static boolean profileForCalling() {
return messageRequests() && getBoolean(PROFILE_FOR_CALLING, false);
return getBoolean(PROFILE_FOR_CALLING, false);
}
/** Whether or not to display Calling PIP */

View File

@@ -119,7 +119,7 @@ public final class GroupUtil {
public String toString(Recipient sender) {
StringBuilder description = new StringBuilder();
description.append(context.getString(R.string.MessageRecord_s_updated_group, sender.toShortString(context)));
description.append(context.getString(R.string.MessageRecord_s_updated_group, sender.getDisplayName(context)));
if (groupContext == null) {
return description.toString();
@@ -162,7 +162,7 @@ public final class GroupUtil {
StringBuilder result = new StringBuilder();
for (int i = 0; i < recipients.size(); i++) {
result.append(Recipient.live(recipients.get(i)).get().toShortString(context));
result.append(Recipient.live(recipients.get(i)).get().getDisplayName(context));
if (i != recipients.size() -1 )
result.append(", ");

View File

@@ -232,11 +232,11 @@ public class IdentityUtil {
if (recipients.isEmpty()) return null;
if (recipients.size() == 1) {
String name = recipients.get(0).toShortString(context);
String name = recipients.get(0).getDisplayName(context);
return context.getString(resourceOne, name);
} else {
String firstName = recipients.get(0).toShortString(context);
String secondName = recipients.get(1).toShortString(context);
String firstName = recipients.get(0).getDisplayName(context);
String secondName = recipients.get(1).getDisplayName(context);
if (recipients.size() == 2) {
return context.getString(resourceTwo, firstName, secondName);