Add excluded E164s configuration to pre-registration experiment

This commit is contained in:
Chris Eager
2021-07-29 11:29:41 -05:00
committed by Chris Eager
parent df9c0051c9
commit 51b7a8d868
4 changed files with 50 additions and 22 deletions

View File

@@ -20,12 +20,16 @@ public class DynamicPreRegistrationExperimentEnrollmentConfiguration {
@JsonProperty
@Valid
private Set<String> excludedCountryCodes = Collections.emptySet();
private Set<String> excludedE164s = Collections.emptySet();
@JsonProperty
@Valid
private Set<String> includedCountryCodes = Collections.emptySet();
@JsonProperty
@Valid
private Set<String> excludedCountryCodes = Collections.emptySet();
@JsonProperty
@Valid
@Min(0)
@@ -36,14 +40,18 @@ public class DynamicPreRegistrationExperimentEnrollmentConfiguration {
return enrolledE164s;
}
public Set<String> getExcludedCountryCodes() {
return excludedCountryCodes;
public Set<String> getExcludedE164s() {
return excludedE164s;
}
public Set<String> getIncludedCountryCodes() {
return includedCountryCodes;
}
public Set<String> getExcludedCountryCodes() {
return excludedCountryCodes;
}
public int getEnrollmentPercentage() {
return enrollmentPercentage;
}

View File

@@ -47,6 +47,10 @@ public class ExperimentEnrollmentManager {
return true;
}
if (config.getExcludedE164s().contains(e164)) {
return false;
}
{
final String countryCode = Util.getCountryCode(e164);