summaryrefslogtreecommitdiff
path: root/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java')
-rw-r--r--adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java335
1 files changed, 52 insertions, 283 deletions
diff --git a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java
index ef24154acd..a9fa269095 100644
--- a/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java
+++ b/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/noising/SourceNoiseHandlerAttributionProbabilityTest.java
@@ -16,14 +16,6 @@
package com.android.adservices.service.measurement.noising;
-import static com.android.adservices.service.Flags.MEASUREMENT_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_EVENT_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_INSTALL_ATTR_EVENT_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY;
-import static com.android.adservices.service.Flags.MEASUREMENT_NAVIGATION_NOISE_PROBABILITY;
import static com.android.adservices.service.measurement.SourceFixture.ValidSourceParams.ATTRIBUTION_DESTINATIONS;
import static com.android.adservices.service.measurement.SourceFixture.ValidSourceParams.WEB_DESTINATIONS;
@@ -61,18 +53,22 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
private static final String DELIMITER = ",";
private static final long CURRENT_TIME = System.currentTimeMillis();
+ private static final double INSTALL_ATTR_EVENT_NOISE_PROBABILITY = 0.0000125D;
+ private static final double INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY = 0.0024263D;
+ private static final double EVENT_NOISE_PROBABILITY = 0.0000025D;
+ private static final double NAVIGATION_NOISE_PROBABILITY = 0.0024263D;
+ private static final double INSTALL_ATTR_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY =
+ 0.0170218D;
+
private final String mDescription;
- private final boolean mIsEnableConfigurableEventReportingWindows;
private final Source mSource;
private final Long[] mEarlyReportingWindows;
private final double mExpectedProbability;
- private final boolean mEnableConfiguredMaxEventReports;
private final int mConfiguredMaxEventReportsCount;
/**
- * The data format is measurement_enable_configurable_event_reporting_windows flag, sourceType,
- * sourceEventReportWindow (limit), cooldown window, appDestination, webDestination
- * configuredEarlyReportingWindows, coarse destination, enable configured conversions,
+ * The data format is sourceType, sourceEventReportWindow (limit), cooldown window,
+ * appDestination, webDestination, configuredEarlyReportingWindows, coarse destination,
* configured conversions and expectedProbability. Each test description has numbers like 1-1-1,
* 2-1-2, 3-3-3 etc. These signify max reports, trigger data bits and reporting windows count
* respectively. For e.g., 2-1-2 stands for 2 maximum conversions, 1 trigger data bit (0 or 1)
@@ -85,7 +81,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
{
"non-configured reporting windows, EVENT, 1-1-1, app, fine "
+ "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -93,15 +88,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configured max reports
1, // configured max reports
- MEASUREMENT_EVENT_NOISE_PROBABILITY, // probability
+ EVENT_NOISE_PROBABILITY, // probability
},
{
"non-configured reporting windows, EVENT, 2-1-2, app, install "
+ "detection, fine "
+ "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -109,14 +102,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configured max reports
1, // configured max reports
- MEASUREMENT_INSTALL_ATTR_EVENT_NOISE_PROBABILITY, // probability
+ INSTALL_ATTR_EVENT_NOISE_PROBABILITY, // probability
},
{
"non-configured reporting windows, EVENT, 1-1-1, web, fine "
+ "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -124,14 +115,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configured max reports
1, // configured max reports
- MEASUREMENT_EVENT_NOISE_PROBABILITY, // probability
+ EVENT_NOISE_PROBABILITY, // probability
},
{
"non-configured reporting windows, EVENT, 1-1-1, app and web, "
+ "fine destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -139,155 +128,56 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configured max reports
1, // configured max reports
- MEASUREMENT_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY, // probability
+ 0.0000042, // probability
},
{
- "non-configured reporting windows, EVENT, 2-1-2, app & web, "
+ "non-configured reporting windows, EVENT, 2-1-2, app, "
+ "install "
+ "detection, fine"
+ " destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
ATTRIBUTION_DESTINATIONS, // app destination
- WEB_DESTINATIONS, // app destination
+ null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configured max reports
1, // configured max reports
- MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY,
+ 0.0000125,
},
{
- "non-configured reporting windows, EVENT, 2-1-2, app & web, "
+ "non-configured reporting windows, EVENT, 2-1-1, app, "
+ "install "
- + "detection, coarse"
+ + "detection, fine"
+ " destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
- DAYS.toMillis(10), // source event report window
+ DAYS.toMillis(1), // source event report window
DAYS.toMillis(1), // install cooldown window
ATTRIBUTION_DESTINATIONS, // app destination
- WEB_DESTINATIONS, // app destination
- new Long[] {}, // early reporting windows
- true, // coarse destinations
- false, // enable configurable max reports
- 1, // configured max reports
- MEASUREMENT_INSTALL_ATTR_EVENT_NOISE_PROBABILITY,
- },
- {
- "non-configured reporting windows, NAVIGATION, 3-3-3, app, fine "
- + "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
- DAYS.toMillis(10), // source event report window
- 0, // install cooldown window
- ATTRIBUTION_DESTINATIONS, // app destination
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configured max reports
- 3, // configured max reports
- MEASUREMENT_NAVIGATION_NOISE_PROBABILITY, // probability
+ 1, // configured max reports
+ 0.000005,
},
{
- "non-configured reporting windows, NAVIGATION, 3-3-3, app, install "
- + "detection, fine "
- + "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
+ "non-configured reporting windows, EVENT, 2-1-2, app, "
+ + "install "
+ + "detection, coarse"
+ + " destinations",
+ Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
ATTRIBUTION_DESTINATIONS, // app destination
null, // web destination
new Long[] {}, // early reporting windows
- false, // coarse destinations
- false, // enable configured max reports
- 3, // configured max reports
- MEASUREMENT_INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY, // probability
- },
- {
- "non-configured reporting windows, NAVIGATION, 3-3-3, web, fine "
- + "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
- DAYS.toMillis(10), // source event report window
- 0, // install cooldown window
- null,
- WEB_DESTINATIONS, // web destination
- new Long[] {}, // early reporting windows
- false, // coarse destinations
- false, // enable configurable max reports
- 3, // configured max reports
- MEASUREMENT_NAVIGATION_NOISE_PROBABILITY, // probability
- },
- {
- "non-configured reporting windows, NAVIGATION, 3-3-3, app & web, "
- + "fine destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
- DAYS.toMillis(10), // source event report window
- 0, // install cooldown window
- ATTRIBUTION_DESTINATIONS, // app destination
- WEB_DESTINATIONS, // web destination
- new Long[] {}, // early reporting windows
- false, // coarse destinations
- false, // enable configurable max reports
- 3, // configured max reports
- MEASUREMENT_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY, // probability
- },
- {
- "non-configured reporting windows, NAVIGATION, 3-3-3, app & web, "
- + "coarse destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
- DAYS.toMillis(10), // source event report window
- 0, // install cooldown window
- ATTRIBUTION_DESTINATIONS, // app destination
- WEB_DESTINATIONS, // web destination
- new Long[] {}, // early reporting windows
true, // coarse destinations
- false, // enable configurable max reports
- 3, // configured max reports
- MEASUREMENT_NAVIGATION_NOISE_PROBABILITY, // probability
- },
- {
- "non-configured reporting windows, NAVIGATION, 3-3-3, app & web, "
- + "install detection,"
- + " fine destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
- DAYS.toMillis(10), // source event report window
- DAYS.toMillis(1), // install cooldown window
- ATTRIBUTION_DESTINATIONS, // app destination
- WEB_DESTINATIONS, // web destination
- new Long[] {}, // early reporting windows
- false, // coarse destinations
- false, // enable configurable max reports
- 3, // configured max reports
- MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY,
- },
- {
- "non-configured reporting windows, NAVIGATION, 3-3-3, app & web, "
- + "install detection,"
- + " coarse destinations",
- false, // measurement_enable_configurable_event_reporting_windows
- Source.SourceType.NAVIGATION, // source type
- DAYS.toMillis(10), // source event report window
- DAYS.toMillis(1), // install cooldown window
- ATTRIBUTION_DESTINATIONS, // app destination
- WEB_DESTINATIONS, // web destination
- new Long[] {}, // early reporting windows
- true, // coarse destinations
- false, // enable configurable max reports
- 3, // configured max reports
- MEASUREMENT_INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY,
+ 1, // configured max reports
+ INSTALL_ATTR_EVENT_NOISE_PROBABILITY,
},
{
"configured reporting windows, EVENT, 1-1-1, app, fine " + "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -295,13 +185,11 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_EVENT_NOISE_PROBABILITY, // probability
+ EVENT_NOISE_PROBABILITY, // probability
},
{
"configured reporting windows, EVENT, 1-1-2, app, fine " + "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -309,13 +197,11 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1)}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
0.0000042,
},
{
"configured reporting windows, EVENT, 1-1-3, app, fine " + "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -323,7 +209,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
0.0000058, // probability
},
@@ -331,7 +216,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, EVENT, 1-1-2(1 effective window), "
+ "app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -339,15 +223,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {DAYS.toSeconds(15)}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_EVENT_NOISE_PROBABILITY, // probability
+ EVENT_NOISE_PROBABILITY, // probability
},
{
"configured reporting windows, EVENT, 1-1-3(2 effective window), "
+ "app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
HOURS.toMillis(6), // source event report window
0, // install cooldown window
@@ -355,15 +237,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
0.0000042,
},
{
- "configured reporting windows, EVENT, 2-1-3(2 effective windows), "
+ "configured reporting windows, EVENT, 1-1-2 (2 effective window), "
+ "app, install "
+ "detection, fine destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
HOURS.toMillis(6), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -373,15 +253,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_INSTALL_ATTR_EVENT_NOISE_PROBABILITY, // probability
+ 0.0000042, // probability
},
{
- "configured reporting windows, EVENT, 2-1-3, app, install "
+ "configured reporting windows, EVENT, 1-1-3, app, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(6), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -391,15 +269,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- 0.0000233, // probability
+ 0.0000058, // probability
},
{
- "configured reporting windows, EVENT, 2-1-3, app & web, install "
+ "configured reporting windows, EVENT, 1-1-3, app & web, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(6), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -409,15 +285,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- 0.0000757, // probability
+ 0.0000108, // probability
},
{
- "configured reporting windows, EVENT, 2-1-3, app & web, install "
+ "configured reporting windows, EVENT, 1-1-3, app & web, install "
+ "detection, coarse "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(6), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -427,16 +301,14 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
true, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- 0.0000233, // probability
+ 0.0000058, // probability
},
{
"configured reporting windows, EVENT, 1-1-1, web, (install "
+ "cooldown -"
+ " unused), fine"
+ " destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -444,21 +316,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_EVENT_NOISE_PROBABILITY, // probability
+ EVENT_NOISE_PROBABILITY, // probability
},
{
- // It is different from "non-configured reporting windows, 2-1-2,
- // app
- // & web, install
- // detection" because we reject 20 states resulting into only 25
- // states in
- // that case. Here we assume all 45 states to be valid.
- "configured reporting windows, EVENT, 2-1-2, app & web, install "
+ "configured reporting windows, EVENT, 1-1-2, app & web, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -466,21 +330,13 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {HOURS.toSeconds(1)}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- 0.0000374, // probability
+ 0.0000075, // probability
},
{
- // It is different from "non-configured reporting windows, 2-1-2,
- // app
- // & web, install
- // detection, coarse destinations" because we reject 20 states
- // resulting into only 25 states in that case. Here we assume all
- // 45 states to be valid.
- "configured reporting windows, EVENT, 2-1-2, app & web, install "
+ "configured reporting windows, EVENT, 1-1-2, app & web, install "
+ "detection, coarse "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -488,14 +344,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {HOURS.toSeconds(1)}, // early reporting windows
true, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- 0.0000125, // probability
+ 0.0000042, // probability
},
{
"configured (ignored due to empty), EVENT, 2-1-2, app, install "
+ "detection, fine destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -503,14 +357,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_INSTALL_ATTR_EVENT_NOISE_PROBABILITY, // probability
+ INSTALL_ATTR_EVENT_NOISE_PROBABILITY, // probability
},
{
"configured reporting windows, EVENT, 1-1-1, app & web, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -518,14 +370,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY, // probability
+ 0.0000042, // probability
},
{
"configured reporting windows, EVENT, 1-1-1, app & web, coarse "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -533,14 +383,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
true, // coarse destinations
- false, // enable configurable max reports
1, // configured max reports
- MEASUREMENT_EVENT_NOISE_PROBABILITY, // probability
+ EVENT_NOISE_PROBABILITY, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-1, app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -548,14 +396,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0001372, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-2, app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -563,14 +409,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1)}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0008051, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-3, app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -578,16 +422,14 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
- MEASUREMENT_NAVIGATION_NOISE_PROBABILITY, // probability
+ NAVIGATION_NOISE_PROBABILITY, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-2 (1 effective "
+ "window)"
+ ", app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(2), // source event report window
0, // install cooldown window
@@ -595,7 +437,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {DAYS.toMillis(3)}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0001372, // probability
},
@@ -603,7 +444,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, NAVIGATION, 3-3-3 (2 effective "
+ "windows), app, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
HOURS.toMillis(6), // source event report window
0, // install cooldown window
@@ -611,7 +451,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0008051, // probability
},
@@ -619,7 +458,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, NAVIGATION, 3-3-1, app, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -627,7 +465,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0001372, // probability
},
@@ -635,7 +472,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, NAVIGATION, 3-3-1, web, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -643,14 +479,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0001372, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-1, app & web, fine"
+ " destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -658,14 +492,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0008051, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-1, app & web, "
+ "coarse destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -673,7 +505,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
true, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0001372, // probability
},
@@ -682,7 +513,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
+ "install "
+ "detection, "
+ "fine destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -690,7 +520,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0008051, // probability
},
@@ -699,7 +528,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
+ "install "
+ "detection, "
+ "coarse destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -707,7 +535,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // app destination
new Long[] {}, // early reporting windows
true, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
0.0001372, // probability
},
@@ -716,7 +543,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
+ "install "
+ "detection, fine"
+ " destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -724,16 +550,14 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {HOURS.toSeconds(2), DAYS.toSeconds(2)},
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
- MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY,
+ INSTALL_ATTR_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY,
},
{
"configured reporting windows, NAVIGATION, 3-3-3, app & web, "
+ "install "
+ "detection, "
+ "coarse destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -741,14 +565,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {HOURS.toSeconds(2), DAYS.toSeconds(2)},
true, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
- MEASUREMENT_INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY,
+ INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY,
},
{
"configured reporting windows, NAVIGATION, 3-3-3, app, install "
+ "detection, fine destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -756,14 +578,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(2), DAYS.toSeconds(2)},
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
- MEASUREMENT_INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY, // probability
+ INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-3, app & web, fine"
+ " destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -771,14 +591,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {HOURS.toSeconds(2), DAYS.toSeconds(2)},
false, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
- MEASUREMENT_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY, // probability
+ 0.0170218, // probability
},
{
"configured reporting windows, NAVIGATION, 3-3-3, app & web, "
+ "coarse destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.NAVIGATION, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -786,14 +604,12 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
WEB_DESTINATIONS, // web destination
new Long[] {HOURS.toSeconds(2), DAYS.toSeconds(2)},
true, // coarse destinations
- false, // enable configurable max reports
3, // configured max reports
- MEASUREMENT_NAVIGATION_NOISE_PROBABILITY, // probability
+ NAVIGATION_NOISE_PROBABILITY, // probability
},
{
"non-configured reporting windows, EVENT, 3-1-1, app, fine "
+ "destinations",
- false, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -801,13 +617,11 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {}, // early reporting windows
false, // coarse destinations
- true, // enable configured max reports
3, // configured max reports
0.0000083, // probability
},
{
"configured reporting windows, EVENT, 3-1-3, app, fine " + "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -815,13 +629,11 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- true, // enable configurable max reports
3, // configured max reports
0.0000698, // probability
},
{
"configured reporting windows, EVENT, 2-1-3, app, fine " + "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -829,7 +641,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- true, // enable configurable max reports
2, // configured max reports
0.0000233, // probability
},
@@ -837,7 +648,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, EVENT, 3-1-3, app, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(6), // source event report window
// not honored because conversions and windows are overridden
@@ -848,7 +658,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
false, // coarse destinations
- true, // enable configurable max reports
3, // configured max reports
0.0000698, // probability
},
@@ -856,7 +665,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, EVENT, 3-1-3, app & web, install "
+ "detection, fine "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(6), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -866,7 +674,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
false, // coarse destinations
- true, // enable configurable max reports
3, // configured max reports
0.0003782, // probability
},
@@ -874,7 +681,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
"configured reporting windows, EVENT, 3-1-3, app & web, install "
+ "detection, coarse "
+ "destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(6), // source event report window
DAYS.toMillis(1), // install cooldown window
@@ -884,13 +690,11 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
HOURS.toSeconds(1), DAYS.toSeconds(1)
}, // early reporting windows
true, // coarse destinations
- true, // enable configurable max reports
3, // configured max reports
0.0000698, // probability
},
{
"configured reporting windows, EVENT, 1-1-3, app, fine" + " destinations",
- true, // measurement_enable_configurable_event_reporting_windows
Source.SourceType.EVENT, // source type
DAYS.toMillis(10), // source event report window
0, // install cooldown window
@@ -898,7 +702,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
null, // web destination
new Long[] {HOURS.toSeconds(1), DAYS.toSeconds(1)},
false, // coarse destinations
- true, // enable configurable max reports
1, // configured max reports
0.0000058, // probability
},
@@ -907,7 +710,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
public SourceNoiseHandlerAttributionProbabilityTest(
String description,
- boolean isEnableConfigurableEventReportingWindows,
Source.SourceType sourceType,
long sourceEventReportWindow,
long coolDownWindow,
@@ -915,11 +717,9 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
List<Uri> webDestinations,
Long[] earlyReportingWindows,
boolean coarseDestination,
- boolean isEnableConfigurableMaxEventReports,
int configuredMaxEventReportsCount,
double expectedProbability) {
mDescription = description;
- mIsEnableConfigurableEventReportingWindows = isEnableConfigurableEventReportingWindows;
mSource =
SourceFixture.getMinimalValidSourceBuilder()
.setSourceType(sourceType)
@@ -936,7 +736,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
BigDecimal.valueOf(expectedProbability)
.setScale(7, RoundingMode.HALF_UP)
.doubleValue();
- mEnableConfiguredMaxEventReports = isEnableConfigurableMaxEventReports;
mConfiguredMaxEventReportsCount = configuredMaxEventReportsCount;
}
@@ -944,9 +743,6 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
public void getRandomAttributionProbability_withParameterizedData() {
// Setup
Flags flags = mock(Flags.class);
- doReturn(mIsEnableConfigurableEventReportingWindows)
- .when(flags)
- .getMeasurementEnableConfigurableEventReportingWindows();
doReturn(convertEarlyReportingWindowFlagString(mEarlyReportingWindows))
.when(flags)
.getMeasurementEventReportsVtcEarlyReportingWindows();
@@ -954,36 +750,9 @@ public class SourceNoiseHandlerAttributionProbabilityTest {
.when(flags)
.getMeasurementEventReportsCtcEarlyReportingWindows();
doReturn(true).when(flags).getMeasurementEnableCoarseEventReportDestinations();
- doReturn(mEnableConfiguredMaxEventReports)
- .when(flags)
- .getMeasurementEnableVtcConfigurableMaxEventReports();
doReturn(mConfiguredMaxEventReportsCount)
.when(flags)
.getMeasurementVtcConfigurableMaxEventReportsCount();
- doReturn(MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementInstallAttrDualDestinationEventNoiseProbability();
- doReturn(MEASUREMENT_INSTALL_ATTR_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementInstallAttrDualDestinationNavigationNoiseProbability();
- doReturn(MEASUREMENT_DUAL_DESTINATION_NAVIGATION_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementDualDestinationNavigationNoiseProbability();
- doReturn(MEASUREMENT_DUAL_DESTINATION_EVENT_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementDualDestinationEventNoiseProbability();
- doReturn(MEASUREMENT_INSTALL_ATTR_EVENT_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementInstallAttrEventNoiseProbability();
- doReturn(MEASUREMENT_INSTALL_ATTR_NAVIGATION_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementInstallAttrNavigationNoiseProbability();
- doReturn(MEASUREMENT_EVENT_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementEventNoiseProbability();
- doReturn(MEASUREMENT_NAVIGATION_NOISE_PROBABILITY)
- .when(flags)
- .getMeasurementNavigationNoiseProbability();
// Execution
double actualProbability =