Filter badly-formatted numbers from one-off CDS requests.

fork-5.53.8
Greyson Parrelli 2022-09-19 11:18:54 -04:00
rodzic db16155b0d
commit aab8bd1261
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -65,7 +65,7 @@ object ContactDiscoveryRefreshV2 {
@JvmStatic
fun refresh(context: Context, inputRecipients: List<Recipient>, useCompat: Boolean, ignoreResults: Boolean): ContactDiscovery.RefreshResult {
val recipients: List<Recipient> = inputRecipients.map { it.resolve() }
val inputE164s: Set<String> = recipients.mapNotNull { it.e164.orElse(null) }.toSet()
val inputE164s: Set<String> = recipients.mapNotNull { it.e164.orElse(null) }.toSet().sanitize()
return if (inputE164s.size > MAXIMUM_ONE_OFF_REQUEST_SIZE) {
Log.i(TAG, "List of specific recipients to refresh is too large! (Size: ${recipients.size}). Doing a full refresh instead.")

Wyświetl plik

@ -104,7 +104,7 @@ public final class FeatureFlags {
private static final String RECIPIENT_MERGE_V2 = "android.recipientMergeV2";
private static final String CDS_V2_LOAD_TEST = "android.cdsV2LoadTest";
private static final String SMS_EXPORTER = "android.sms.exporter";
private static final String CDS_V2_COMPAT = "android.cdsV2Compat.2";
private static final String CDS_V2_COMPAT = "android.cdsV2Compat.3";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable