Basic client usage of CDSHv2.

This provides a basic (read: useful-for-development-yet-broken) client
usage of CDSHv2.
This commit is contained in:
Greyson Parrelli
2022-04-11 19:59:17 -04:00
parent b0e7b49056
commit d3096c56cb
13 changed files with 457 additions and 17 deletions

View File

@@ -95,6 +95,7 @@ public final class FeatureFlags {
private static final String USE_HARDWARE_AEC_IF_OLD = "android.calling.useHardwareAecIfOlderThanApi29";
private static final String USE_AEC3 = "android.calling.useAec3";
private static final String PAYMENTS_COUNTRY_BLOCKLIST = "android.payments.blocklist";
private static final String PNP_CDS = "android.pnp.cds";
/**
* We will only store remote values for flags in this set. If you want a flag to be controllable
@@ -147,7 +148,8 @@ public final class FeatureFlags {
@VisibleForTesting
static final Set<String> NOT_REMOTE_CAPABLE = SetUtil.newHashSet(
PHONE_NUMBER_PRIVACY_VERSION
PHONE_NUMBER_PRIVACY_VERSION,
PNP_CDS
);
/**
@@ -494,6 +496,15 @@ public final class FeatureFlags {
return getBoolean(USE_AEC3, true);
}
/**
* Whether or not to use the phone number privacy CDS flow. Only currently works in staging.
*
* Note: This feature is in very early stages of development and *will* break your contacts.
*/
public static boolean usePnpCds() {
return Environment.IS_STAGING && getBoolean(PNP_CDS, false);
}
/** Only for rendering debug info. */
public static synchronized @NonNull Map<String, Object> getMemoryValues() {
return new TreeMap<>(REMOTE_VALUES);