/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/util/ |
D | MathUtilsTest.java | 35 assertEquals(new UnsignedLong("10"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success() 36 new UnsignedLong("9"), new UnsignedLong("10"), new UnsignedLong("20"))); in extractValidNumberInRange_success() 37 assertEquals(new UnsignedLong("10"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success() 38 new UnsignedLong("10"), new UnsignedLong("10"), new UnsignedLong("20"))); in extractValidNumberInRange_success() 40 assertEquals(new UnsignedLong("20"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success() 41 new UnsignedLong("20"), new UnsignedLong("10"), new UnsignedLong("20"))); in extractValidNumberInRange_success() 42 assertEquals(new UnsignedLong("20"), MathUtils.extractValidNumberInRange( in extractValidNumberInRange_success() 43 new UnsignedLong("21"), new UnsignedLong("10"), new UnsignedLong("20"))); in extractValidNumberInRange_success() 47 UnsignedLong twoToThe64Minus1 = new UnsignedLong("18446744073709551615"); in extractValidNumberInRange_success() 48 UnsignedLong twoToThe64Minus2 = new UnsignedLong("18446744073709551614"); in extractValidNumberInRange_success() [all …]
|
D | UnsignedLongTest.java | 27 private static final UnsignedLong ULONG_LONG = new UnsignedLong(2L); 28 private static final UnsignedLong ULONG_STR = new UnsignedLong("2"); 29 private static final UnsignedLong LARGE = new UnsignedLong("9223372036854775808"); 30 private static final UnsignedLong LARGER = new UnsignedLong("9223372036854775809"); 41 assertNotEquals(ULONG_LONG, new UnsignedLong(3L)); in testEqualsFail() 42 assertNotEquals(ULONG_STR, new UnsignedLong(3L)); in testEqualsFail() 48 assertTrue(LARGE.compareTo(new UnsignedLong("9223372036854775808")) == 0); in testCompareTo_equal() 53 assertTrue(ULONG_LONG.compareTo(new UnsignedLong(3L)) < 0); in testCompareTo_smaller() 60 assertTrue(ULONG_LONG.compareTo(new UnsignedLong(1L)) > 0); 74 assertNotEquals(ULONG_LONG.hashCode(), new UnsignedLong(3L).hashCode()); in testHashCode_notEquals() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/reporting/ |
D | DebugKeyAccessorTest.java | 45 import com.android.adservices.service.measurement.util.UnsignedLong; 63 private static final UnsignedLong SOURCE_DEBUG_KEY = new UnsignedLong(111111L); 64 private static final UnsignedLong TRIGGER_DEBUG_KEY = new UnsignedLong(222222L); 116 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_appToAppWithAdIdPermission_debugKeysPresent() 143 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_appToAppNoAdIdPermission_debugKeysAbsent() 171 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_appToAppNoAdIdPermissionWithJoinKeys_debugKeysAbsent() 199 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_appToAppWithSourceAdId_sourceDebugKeyPresent() 227 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_appToAppWithTriggerAdId_triggerDebugKeyPresent() 255 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_webToWebWithSameRegistrant_debugKeysPresent() 283 Pair<UnsignedLong, UnsignedLong> debugKeyPair = in getDebugKeys_webToWebNoJoinKeysAndDifferentRegistrants_debugKeysAbsent() [all …]
|
D | EventReportPayloadTest.java | 26 import com.android.adservices.service.measurement.util.UnsignedLong; 43 private static final UnsignedLong SOURCE_EVENT_ID = new UnsignedLong(12345L); 44 private static final UnsignedLong TRIGGER_DATA = new UnsignedLong(2L); 48 private static final UnsignedLong SOURCE_DEBUG_KEY = new UnsignedLong(3894783L); 49 private static final UnsignedLong TRIGGER_DEBUG_KEY = new UnsignedLong(2387222L); 51 private static final List<UnsignedLong> TRIGGER_DEBUG_KEYS = List.of( 52 new UnsignedLong(2387222L), new UnsignedLong("9223372036854775809")); 55 UnsignedLong triggerData, in createEventReportPayload() 56 List<UnsignedLong> triggerDebugKeys) { in createEventReportPayload() 66 UnsignedLong triggerData, in createEventReportPayload() [all …]
|
D | EventReportSenderTest.java | 28 import com.android.adservices.service.measurement.util.UnsignedLong; 46 private static final UnsignedLong SOURCE_EVENT_ID = new UnsignedLong(12345L); 47 private static final UnsignedLong TRIGGER_DATA = new UnsignedLong(2L);
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/measurement/ |
D | EventTriggerTest.java | 27 import com.android.adservices.service.measurement.util.UnsignedLong; 75 EventTrigger eventTrigger = new EventTrigger.Builder(new UnsignedLong(0L)).build(); in testDefaults() 86 new EventTrigger.Builder(new UnsignedLong(101L)) in test_equals_pass() 89 .setDedupKey(new UnsignedLong(1001L)) in test_equals_pass() 102 new EventTrigger.Builder(new UnsignedLong(101L)) in test_equals_pass() 105 .setDedupKey(new UnsignedLong(1001L)) in test_equals_pass() 124 new EventTrigger.Builder(new UnsignedLong(0L)).setTriggerPriority(1L).build(), in test_equals_fail() 125 new EventTrigger.Builder(new UnsignedLong(0L)).setTriggerPriority(2L).build()); in test_equals_fail() 127 new EventTrigger.Builder(new UnsignedLong(0L)).setTriggerValue(100L).build(), in test_equals_fail() 128 new EventTrigger.Builder(new UnsignedLong(0L)).setTriggerValue(120L).build()); in test_equals_fail() [all …]
|
D | TriggerSpecsTest.java | 28 import com.android.adservices.service.measurement.util.UnsignedLong; 88 new UnsignedLong(1L), new UnsignedLong(2L), new UnsignedLong(3L))), in constructorThreeParameters_completeExpectation_success() 93 new UnsignedLong(4L), in constructorThreeParameters_completeExpectation_success() 94 new UnsignedLong(5L), in constructorThreeParameters_completeExpectation_success() 95 new UnsignedLong(6L), in constructorThreeParameters_completeExpectation_success() 96 new UnsignedLong(7L))), in constructorThreeParameters_completeExpectation_success() 118 triggerRecord1.put("trigger_data", new UnsignedLong(1L).toString()); in equals_fourParamConstructor_returnsTrue() 119 triggerRecord1.put("dedup_key", new UnsignedLong(34567L).toString()); in equals_fourParamConstructor_returnsTrue() 126 triggerRecord2.put("trigger_data", new UnsignedLong(1L).toString()); in equals_fourParamConstructor_returnsTrue() 127 triggerRecord2.put("dedup_key", new UnsignedLong(45678L).toString()); in equals_fourParamConstructor_returnsTrue() [all …]
|
D | EventReportTest.java | 42 import com.android.adservices.service.measurement.util.UnsignedLong; 74 private static final UnsignedLong TRIGGER_DEDUP_KEY = new UnsignedLong(2345678L); 75 private static final UnsignedLong TRIGGER_DATA = new UnsignedLong(4L); 76 private static final UnsignedLong SOURCE_DEBUG_KEY = new UnsignedLong(237865L); 77 private static final UnsignedLong TRIGGER_DEBUG_KEY = new UnsignedLong(928762L); 78 private static final List<UnsignedLong> TRIGGER_DEBUG_KEYS = List.of( 79 new UnsignedLong(928762L), new UnsignedLong("9223372036854775809")); 107 private static final Pair<UnsignedLong, UnsignedLong> sDebugKeyPair = 138 assertEquals(new UnsignedLong(21L), eventReport.getSourceEventId()); in creation_success() 143 assertEquals(new UnsignedLong(8L), eventReport.getTriggerData()); in creation_success() [all …]
|
D | AttributedTriggerTest.java | 23 import com.android.adservices.service.measurement.util.UnsignedLong; 36 private static final UnsignedLong TRIGGER_DATA1 = new UnsignedLong("556"); 37 private static final UnsignedLong TRIGGER_DATA2 = new UnsignedLong("446"); 42 private static final UnsignedLong DEDUP_KEY1 = new UnsignedLong("453"); 43 private static final UnsignedLong DEDUP_KEY2 = new UnsignedLong("357"); 44 private static final UnsignedLong DEBUG_KEY1 = new UnsignedLong("980"); 45 private static final UnsignedLong DEBUG_KEY2 = new UnsignedLong("812");
|
D | XNetworkDataTest.java | 27 import com.android.adservices.service.measurement.util.UnsignedLong; 43 12L, (long) xNetworkData.getKeyOffset().map(UnsignedLong::getValue).orElse(0L)); in testCreation() 50 UnsignedLong keyOffsetValue = new UnsignedLong(10L); in creation_withJsonObject_success() 92 new XNetworkData.Builder().setKeyOffset(new UnsignedLong(13L)).build(); in testHashCode_notEquals() 101 return new XNetworkData.Builder().setKeyOffset(new UnsignedLong(12L)).build(); in createExample()
|
D | SourceTest.java | 47 import com.android.adservices.service.measurement.util.UnsignedLong; 76 private static final UnsignedLong DEBUG_KEY_1 = new UnsignedLong(81786463L); 77 private static final UnsignedLong DEBUG_KEY_2 = new UnsignedLong(23487834L); 78 private static final UnsignedLong SHARED_DEBUG_KEY_1 = new UnsignedLong(1786463L); 79 private static final UnsignedLong SHARED_DEBUG_KEY_2 = new UnsignedLong(3487834L); 85 /* UnsignedLong triggerData */ new UnsignedLong("89"), 139 .setEventId(new UnsignedLong(2L)) in testEqualsPass() 149 .map(UnsignedLong::new) in testEqualsPass() 154 .map(UnsignedLong::new) in testEqualsPass() 193 .setEventId(new UnsignedLong(2L)) in testEqualsPass() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/ |
D | EventReport.java | 28 import com.android.adservices.service.measurement.util.UnsignedLong; 45 private UnsignedLong mSourceEventId; 51 private UnsignedLong mTriggerData; 52 private UnsignedLong mTriggerDedupKey; 57 @Nullable private UnsignedLong mSourceDebugKey; 58 @Nullable private UnsignedLong mTriggerDebugKey; 59 @NonNull private List<UnsignedLong> mTriggerDebugKeys; 153 public UnsignedLong getSourceEventId() { in getSourceEventId() 195 public UnsignedLong getTriggerData() { in getTriggerData() 202 public UnsignedLong getTriggerDedupKey() { in getTriggerDedupKey() [all …]
|
D | AttributedTrigger.java | 20 import com.android.adservices.service.measurement.util.UnsignedLong; 31 private final UnsignedLong mTriggerData; 34 private final UnsignedLong mDedupKey; 35 private final UnsignedLong mDebugKey; 77 mTriggerData = new UnsignedLong( in AttributedTrigger() 93 mDedupKey = new UnsignedLong( in AttributedTrigger() 99 mDebugKey = new UnsignedLong( in AttributedTrigger() 113 UnsignedLong triggerData, in AttributedTrigger() 114 UnsignedLong dedupKey) { in AttributedTrigger() 128 UnsignedLong triggerData, in AttributedTrigger() [all …]
|
D | TriggerSpecs.java | 26 import com.android.adservices.service.measurement.util.UnsignedLong; 48 private final Map<UnsignedLong, Integer> mTriggerDataToTriggerSpecIndexMap = new HashMap<>(); 53 public static final UnsignedLong MAX_TRIGGER_DATA_VALUE = new UnsignedLong((1L << 32) - 1L); 107 for (UnsignedLong triggerData : mTriggerSpecs[i].getTriggerData()) { in TriggerSpecs() 136 for (UnsignedLong triggerData : triggerSpecs[i].getTriggerData()) { in TriggerSpecs() 217 public UnsignedLong getTriggerDataFromIndex(int triggerDataIndex) { in getTriggerDataFromIndex() 247 public List<Long> getSummaryBucketsForTriggerData(UnsignedLong triggerData) { in getSummaryBucketsForTriggerData() 256 public TriggerSpec.SummaryOperatorType getSummaryOperatorType(UnsignedLong triggerData) { in getSummaryOperatorType() 265 public Long findReportingStartTimeForTriggerData(UnsignedLong triggerData) { in findReportingStartTimeForTriggerData() 274 public List<Long> findReportingEndTimesForTriggerData(UnsignedLong triggerData) { in findReportingEndTimesForTriggerData() [all …]
|
D | EventTrigger.java | 22 import com.android.adservices.service.measurement.util.UnsignedLong; 31 @NonNull private UnsignedLong mTriggerData; 34 private UnsignedLong mDedupKey; 69 public UnsignedLong getTriggerData() { in getTriggerData() 84 public UnsignedLong getDedupKey() { in getDedupKey() 102 public Builder(@NonNull UnsignedLong triggerData) { in Builder() 121 public EventTrigger.Builder setDedupKey(UnsignedLong dedupKey) { in setDedupKey()
|
D | XNetworkData.java | 25 import com.android.adservices.service.measurement.util.UnsignedLong; 36 private final Optional<UnsignedLong> mKeyOffset; 57 public Optional<UnsignedLong> getKeyOffset() { in getKeyOffset() 63 private Optional<UnsignedLong> mKeyOffset; 74 mKeyOffset = Optional.of(new UnsignedLong(keyOffset)); in Builder() 87 public Builder setKeyOffset(@Nullable UnsignedLong keyOffset) { in setKeyOffset()
|
D | TriggerSpec.java | 19 import com.android.adservices.service.measurement.util.UnsignedLong; 36 private List<UnsignedLong> mTriggerData; 68 public List<UnsignedLong> getTriggerData() { in getTriggerData() 107 .map(UnsignedLong::toString) in encodeJSON() 158 private static List<UnsignedLong> getTriggerDataArrayFromJSON(JSONObject json, String key) in getTriggerDataArrayFromJSON() 169 public static List<UnsignedLong> getTriggerDataArrayFromJSON(JSONArray jsonArray) in getTriggerDataArrayFromJSON() 171 List<UnsignedLong> result = new ArrayList<>(); in getTriggerDataArrayFromJSON() 173 result.add(new UnsignedLong(jsonArray.getString(i))); in getTriggerDataArrayFromJSON() 283 public Builder setTriggerData(List<UnsignedLong> triggerData) { in setTriggerData()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/util/ |
D | UnsignedLong.java | 27 public class UnsignedLong implements Comparable<UnsignedLong> { class 30 public UnsignedLong(@NonNull Long value) { in UnsignedLong() method in UnsignedLong 35 public UnsignedLong(@NonNull String value) { in UnsignedLong() method in UnsignedLong 47 if (!(obj instanceof UnsignedLong)) { in equals() 50 UnsignedLong other = (UnsignedLong) obj; in equals() 55 public int compareTo(UnsignedLong other) { in compareTo() 84 public UnsignedLong mod(int modulus) { in mod() 87 return new UnsignedLong(truncated.toString()); in mod()
|
D | MathUtils.java | 40 public static UnsignedLong extractValidNumberInRange( in extractValidNumberInRange() 41 UnsignedLong value, UnsignedLong lowerLimit, UnsignedLong upperLimit) { in extractValidNumberInRange()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/reporting/ |
D | EventReportPayload.java | 25 import com.android.adservices.service.measurement.util.UnsignedLong; 40 private UnsignedLong mSourceEventId; 41 @NonNull private UnsignedLong mTriggerData; 45 @Nullable private UnsignedLong mSourceDebugKey; 46 @Nullable private UnsignedLong mTriggerDebugKey; 47 @NonNull private List<UnsignedLong> mTriggerDebugKeys; 133 public @NonNull Builder setSourceEventId(@NonNull UnsignedLong sourceEventId) { in setSourceEventId() 141 public @NonNull Builder setTriggerData(@NonNull UnsignedLong triggerData) { in setTriggerData() 172 public @NonNull Builder setSourceDebugKey(@Nullable UnsignedLong sourceDebugKey) { in setSourceDebugKey() 178 public @NonNull Builder setTriggerDebugKey(@Nullable UnsignedLong triggerDebugKey) { in setTriggerDebugKey() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/measurement/deletion/ |
D | MeasurementDataDeleterTest.java | 54 import com.android.adservices.service.measurement.util.UnsignedLong; 284 when(mEventReport1.getTriggerDedupKey()).thenReturn(new UnsignedLong("1")); // S1 - T1 in resetDedupKeys_matchingReports_removesDedupKeysFromSource() 286 when(mEventReport2.getTriggerDedupKey()).thenReturn(new UnsignedLong("22")); // S2 - T2 in resetDedupKeys_matchingReports_removesDedupKeysFromSource() 288 when(mEventReport3.getTriggerDedupKey()).thenReturn(new UnsignedLong("3")); // S1 - T3 in resetDedupKeys_matchingReports_removesDedupKeysFromSource() 329 new UnsignedLong("1"), in resetDedupKeys_matchingReportsDedupAlignFlagOff_removesDedupKeysFromSource() 330 new UnsignedLong("2"), in resetDedupKeys_matchingReportsDedupAlignFlagOff_removesDedupKeysFromSource() 331 new UnsignedLong("3")))) in resetDedupKeys_matchingReportsDedupAlignFlagOff_removesDedupKeysFromSource() 339 new UnsignedLong("11"), in resetDedupKeys_matchingReportsDedupAlignFlagOff_removesDedupKeysFromSource() 340 new UnsignedLong("22"), in resetDedupKeys_matchingReportsDedupAlignFlagOff_removesDedupKeysFromSource() 341 new UnsignedLong("33")))) in resetDedupKeys_matchingReportsDedupAlignFlagOff_removesDedupKeysFromSource() [all …]
|
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/aggregation/ |
D | AggregateReportFixture.java | 24 import com.android.adservices.service.measurement.util.UnsignedLong; 73 public static final UnsignedLong SOURCE_DEBUG_KEY = new UnsignedLong(43254545L); 74 public static final UnsignedLong TRIGGER_DEBUG_KEY = new UnsignedLong(67878545L); 76 public static final UnsignedLong DEDUP_KEY = new UnsignedLong(67878545L);
|
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/com/android/adservices/service/measurement/ |
D | EventReportFixture.java | 22 import com.android.adservices.service.measurement.util.UnsignedLong; 33 .setSourceEventId(new UnsignedLong(21L)) in getBaseEventReportBuild() 37 .setTriggerDedupKey(new UnsignedLong(3L)) in getBaseEventReportBuild() 42 .setSourceDebugKey(new UnsignedLong(237865L)) in getBaseEventReportBuild() 43 .setTriggerDebugKey(new UnsignedLong(928762L)) in getBaseEventReportBuild()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/registration/ |
D | AsyncSourceFetcher.java | 44 import com.android.adservices.service.measurement.util.UnsignedLong; 122 UnsignedLong eventId = new UnsignedLong(0L); in parseCommonSourceParams() 124 Optional<UnsignedLong> maybeEventId = in parseCommonSourceParams() 134 UnsignedLong expiryUnsigned = in parseCommonSourceParams() 136 new UnsignedLong(json.getString(SourceHeaderContract.EXPIRY)), in parseCommonSourceParams() 137 new UnsignedLong(mFlags in parseCommonSourceParams() 139 new UnsignedLong(mFlags in parseCommonSourceParams() 154 UnsignedLong eventReportWindowUnsigned = in parseCommonSourceParams() 156 new UnsignedLong( in parseCommonSourceParams() 158 new UnsignedLong(mFlags in parseCommonSourceParams() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/aggregation/ |
D | AggregateReport.java | 29 import com.android.adservices.service.measurement.util.UnsignedLong; 63 @Nullable private UnsignedLong mSourceDebugKey; 64 @Nullable private UnsignedLong mTriggerDebugKey; 67 private UnsignedLong mDedupKey; 217 public UnsignedLong getSourceDebugKey() { in getSourceDebugKey() 223 public UnsignedLong getTriggerDebugKey() { in getTriggerDebugKey() 258 public UnsignedLong getDedupKey() { in getDedupKey() 435 public Builder setSourceDebugKey(UnsignedLong sourceDebugKey) { in setSourceDebugKey() 441 public Builder setTriggerDebugKey(UnsignedLong triggerDebugKey) { in setTriggerDebugKey() 460 public Builder setDedupKey(@Nullable UnsignedLong dedupKey) { in setDedupKey()
|