Home
last modified time | relevance | path

Searched refs:AdData (Results 1 – 25 of 76) sorted by relevance

1234

/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/cts/
DAdDataTest.java24 import android.adservices.common.AdData;
46 AdData validAdData = in testBuildValidAdDataSuccess()
47 new AdData.Builder() in testBuildValidAdDataSuccess()
66 AdData validAdData = in testParcelValidAdDataWithUnsetKeysAndFiltersSuccess()
67 new AdData.Builder() in testParcelValidAdDataWithUnsetKeysAndFiltersSuccess()
75 AdData fromParcel = AdData.CREATOR.createFromParcel(p); in testParcelValidAdDataWithUnsetKeysAndFiltersSuccess()
86 AdData validAdData = in testParcelValidAdDataWithUnsetRenderIdSuccess()
87 new AdData.Builder() in testParcelValidAdDataWithUnsetRenderIdSuccess()
95 AdData fromParcel = AdData.CREATOR.createFromParcel(p); in testParcelValidAdDataWithUnsetRenderIdSuccess()
102 assertThrows(NullPointerException.class, () -> new AdData.Builder().setRenderUri(null)); in testSetNullUriAdDataThrows()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/android/adservices/common/
DAdDataFixture.java55 for (int key = 0; key <= AdData.MAX_NUM_AD_COUNTER_KEYS; key++) { in getExcessiveNumberOfAdCounterKeys()
70 public static List<AdData> getValidAdsByBuyer(AdTechIdentifier buyer) { in getValidAdsByBuyer()
79 public static List<AdData> getValidFilterAdsByBuyer(AdTechIdentifier buyer) { in getValidFilterAdsByBuyer()
87 public static List<AdData> getValidFilterAdsWithAdRenderIdByBuyer(AdTechIdentifier buyer) { in getValidFilterAdsWithAdRenderIdByBuyer()
98 public static List<AdData> getValidFilterAdsWithInvalidAdRenderIdByBuyer( in getValidFilterAdsWithInvalidAdRenderIdByBuyer()
105 public static List<AdData> getInvalidAdsByBuyer(AdTechIdentifier buyer) { in getInvalidAdsByBuyer()
107 new AdData.Builder() in getInvalidAdsByBuyer()
111 new AdData.Builder() in getInvalidAdsByBuyer()
115 new AdData.Builder() in getInvalidAdsByBuyer()
119 new AdData.Builder() in getInvalidAdsByBuyer()
[all …]
/packages/modules/AdServices/adservices/framework/java/android/adservices/common/
DAdData.java33 public final class AdData implements Parcelable { class
47 public static final Creator<AdData> CREATOR =
48 new Creator<AdData>() {
50 public AdData createFromParcel(@NonNull Parcel in) {
53 return new AdData(in);
57 public AdData[] newArray(int size) {
58 return new AdData[size];
62 private AdData(@NonNull AdData.Builder builder) { in AdData() method in AdData
72 private AdData(@NonNull Parcel in) { in AdData() method in AdData
175 if (!(o instanceof AdData)) return false; in equals()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/
DAdCounterKeyCopierNoOpImplTest.java23 import android.adservices.common.AdData;
54 () -> mAdCounterKeyCopier.copyAdCounterKeys((AdData.Builder) null, sourceAdData)); in testCopyAdCounterKeys_DBAdDataToAdDataBuilder_NullBuilderThrows()
61 () -> mAdCounterKeyCopier.copyAdCounterKeys(new AdData.Builder(), (DBAdData) null)); in testCopyAdCounterKeys_DBAdDataToAdDataBuilder_NullDBAdDataThrows()
70 AdData.Builder targetBuilder = in testCopyAdCounterKeys_DBAdDataToAdDataBuilder()
74 AdData.Builder outputBuilder = in testCopyAdCounterKeys_DBAdDataToAdDataBuilder()
77 AdData outputAdData = outputBuilder.build(); in testCopyAdCounterKeys_DBAdDataToAdDataBuilder()
83 AdData sourceAdData = in testCopyAdCounterKeys_AdDataToRecordArg_NullBuilderThrows()
100 (AdData) null)); in testCopyAdCounterKeys_AdDataToRecordArg_NullAdDataThrows()
105 AdData sourceAdData = in testCopyAdCounterKeys_AdDataToRecordArg()
173 new AdData.Builder(), (JSONObject) null)); in testCopyAdCounterKeys_JsonObjectToAdDataBuilder_NullJsonObjectThrows()
[all …]
DAdCounterKeyCopierImplTest.java23 import android.adservices.common.AdData;
56 () -> mAdCounterKeyCopier.copyAdCounterKeys((AdData.Builder) null, sourceAdData)); in testCopyAdCounterKeys_DBAdDataToAdDataBuilder_NullBuilderThrows()
63 () -> mAdCounterKeyCopier.copyAdCounterKeys(new AdData.Builder(), (DBAdData) null)); in testCopyAdCounterKeys_DBAdDataToAdDataBuilder_NullDBAdDataThrows()
72 AdData.Builder targetBuilder = in testCopyAdCounterKeys_DBAdDataToAdDataBuilder()
76 AdData.Builder outputBuilder = in testCopyAdCounterKeys_DBAdDataToAdDataBuilder()
79 AdData outputAdData = outputBuilder.build(); in testCopyAdCounterKeys_DBAdDataToAdDataBuilder()
85 AdData sourceAdData = in testCopyAdCounterKeys_AdDataToRecordArg_NullBuilderThrows()
102 (AdData) null)); in testCopyAdCounterKeys_AdDataToRecordArg_NullAdDataThrows()
107 AdData sourceAdData = in testCopyAdCounterKeys_AdDataToRecordArg()
189 new AdData.Builder(), (JSONObject) null)); in testCopyAdCounterKeys_JsonObjectToAdDataBuilder_NullJsonObjectThrows()
[all …]
DFrequencyCapAdFiltererImplTest.java33 import android.adservices.common.AdData;
62 private static final AdData.Builder AD_DATA_BUILDER =
65 private static final AdData AD_DATA = AD_DATA_BUILDER.build();
67 private static final AdData AD_DATA_NO_FILTER =
68 new AdData.Builder()
95 final AdData adData = AD_DATA_BUILDER.setAdFilters(null).build(); in testFilterContextualAdsDoesNotFilterNullAdFilters()
106 final AdData adData = in testFilterContextualAdsDoesNotFilterNullComponentFilters()
129 final AdData adDataNotFiltered = in testFilterContextualAdsWithEmptyFrequencyCapFilters()
137 final AdData dataNoFilters = AD_DATA_NO_FILTER; in testFilterContextualAdsWithEmptyFrequencyCapFilters()
157 final AdData adData = in testFilterContextualAdsForNonMatchingFrequencyCap()
[all …]
DFrequencyCapAdFiltererNoOpImplTest.java24 import android.adservices.common.AdData;
49 private static final AdData.Builder AD_DATA_BUILDER =
71 final AdData adData = AD_DATA_BUILDER.setAdFilters(null).build(); in testFilterNullAdFilters()
82 final AdData adData = in testFilterNullComponentFilters()
103 final AdData adData = in testAppInstallFilter()
125 final AdData adData = in testMultipleApps()
149 final AdData adData1 = in testMultipleAds()
154 final AdData adData2 = in testMultipleAds()
DAppInstallAdFiltererNoOpImplTest.java24 import android.adservices.common.AdData;
49 private static final AdData.Builder AD_DATA_BUILDER =
71 final AdData adData = AD_DATA_BUILDER.setAdFilters(null).build(); in testFilterNullAdFilters()
82 final AdData adData = in testFilterNullComponentFilters()
103 final AdData adData = in testAppInstallFilter()
125 final AdData adData = in testMultipleApps()
149 final AdData adData1 = in testMultipleAds()
154 final AdData adData2 = in testMultipleAds()
DAppInstallAdFiltererImplTest.java30 import android.adservices.common.AdData;
77 private static final AdData.Builder AD_DATA_BUILDER =
80 private static final AdData AD_DATA = AD_DATA_BUILDER.build();
82 private static final AdData AD_DATA_NO_FILTER =
83 new AdData.Builder()
110 final AdData adData = AD_DATA_BUILDER.setAdFilters(null).build(); in testFilterContextualAdsDoesNotFilterNullAdFilters()
121 final AdData adData = in testFilterContextualAdsDoesNotFilterNullComponentFilters()
145 final AdData adData = in testFilterContextualAdsDoesNotFilterForAppNotInstalled()
169 final AdData adData = in testFilterContextualAdsFiltersForAppInstalled()
201 final AdData adData = in testFilterContextualAdsFiltersForMixedApps()
[all …]
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/
DAdCounterKeyCopier.java19 import android.adservices.common.AdData;
40 AdData.Builder copyAdCounterKeys( in copyAdCounterKeys()
41 @NonNull AdData.Builder targetBuilder, @NonNull DBAdData sourceAdData); in copyAdCounterKeys()
49 @NonNull JSScriptRecordArgument originalRecordArgument, @NonNull AdData sourceAdData); in copyAdCounterKeys()
66 AdData.Builder copyAdCounterKeys( in copyAdCounterKeys()
67 @NonNull AdData.Builder targetBuilder, @NonNull JSONObject sourceObject); in copyAdCounterKeys()
DAdCounterKeyCopierNoOpImpl.java19 import android.adservices.common.AdData;
42 public AdData.Builder copyAdCounterKeys( in copyAdCounterKeys()
43 @NonNull AdData.Builder targetBuilder, @NonNull DBAdData sourceAdData) { in copyAdCounterKeys()
52 @NonNull JSScriptRecordArgument originalRecordArgument, @NonNull AdData sourceAdData) { in copyAdCounterKeys()
70 public AdData.Builder copyAdCounterKeys( in copyAdCounterKeys()
71 @NonNull AdData.Builder targetBuilder, @NonNull JSONObject sourceObject) { in copyAdCounterKeys()
DAdCounterKeyCopierImpl.java19 import android.adservices.common.AdData;
52 public AdData.Builder copyAdCounterKeys( in copyAdCounterKeys()
53 @NonNull AdData.Builder targetBuilder, @NonNull DBAdData sourceAdData) { in copyAdCounterKeys()
62 @NonNull JSScriptRecordArgument originalRecordArgument, @NonNull AdData sourceAdData) { in copyAdCounterKeys()
98 public AdData.Builder copyAdCounterKeys( in copyAdCounterKeys()
99 @NonNull AdData.Builder targetBuilder, @NonNull JSONObject sourceObject) { in copyAdCounterKeys()
DAdDataArgumentUtil.java23 import android.adservices.common.AdData;
56 public AdData parseJsonResponse(JSONObject jsonObject) throws IllegalArgumentException { in parseJsonResponse()
58 AdData.Builder adDataBuilderWithoutAdCounterKeys = in parseJsonResponse()
59 new AdData.Builder() in parseJsonResponse()
82 public JSScriptArgument asScriptArgument(String name, AdData adData) throws JSONException { in asScriptArgument()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DAdDataValidatorTest.java21 import android.adservices.common.AdData;
59 AdData adData = in testInvalidUri()
60 new AdData.Builder() in testInvalidUri()
80 AdData adData = in testInvalidMetadata()
81 new AdData.Builder() in testInvalidMetadata()
98 AdData adDataWithExceededFrequencyCapLimits = in testExceededFrequencyCapLimits()
119 AdData adDataWithInvalidRenderId = in testInvalidRenderId()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/
DCustomAudienceAdsValidatorTest.java38 import android.adservices.common.AdData;
80 private final List<AdData> mValidAds = AdDataFixture.getValidFilterAdsByBuyer(VALID_BUYER_1);
164 AdData invalidAdDataWithAnotherBuyer = in testValidator_malformedAds()
165 new AdData.Builder() in testValidator_malformedAds()
169 AdData invalidAdDataWithInvalidMetadata = in testValidator_malformedAds()
170 new AdData.Builder() in testValidator_malformedAds()
174 AdData validAdData = in testValidator_malformedAds()
175 new AdData.Builder() in testValidator_malformedAds()
236 List<AdData> tooBigAds = mValidAds; in testValidator_exceedsSizeLimit()
280 List<AdData> tooManyAds = mValidAds; in testValidator_exceedsCountLimit()
DCustomAudienceValidatorTest.java21 import android.adservices.common.AdData;
90 List<AdData> adDataList = AdDataFixture.getValidAdsByBuyer(buyerWithPath); in testInvalidBuyer()
274 AdData invalidAdDataWithAnotherBuyer = in testInvalidAdData()
275 new AdData.Builder() in testInvalidAdData()
279 AdData invalidAdDataWithInvalidMetadata = in testInvalidAdData()
280 new AdData.Builder() in testInvalidAdData()
286 AdData validAdData = in testInvalidAdData()
287 new AdData.Builder() in testInvalidAdData()
342 AdData adDataWithExceededFrequencyCapLimits = in testExceededFrequencyCapLimits()
375 AdData adDataWithInvalidRenderId = in testInvalidRenderId()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/data/common/
DDBAdDataTest.java26 import android.adservices.common.AdData;
45 private static final AdData SAMPLE_AD_DATA =
120 AdData original = AdDataFixture.getValidFilterAdDataByBuyer(CommonFixture.VALID_BUYER_1, 1); in testFromServiceObjectBothFilteringDisabled()
125 AdData noFilters = in testFromServiceObjectBothFilteringDisabled()
126 new AdData.Builder() in testFromServiceObjectBothFilteringDisabled()
135 AdData original = AdDataFixture.getValidFilterAdDataByBuyer(CommonFixture.VALID_BUYER_1, 1); in testFromServiceObjectAppInstallFilteringDisabledFrequencyCapEnabled()
147 AdData original = AdDataFixture.getValidFilterAdDataByBuyer(CommonFixture.VALID_BUYER_1, 1); in testFromServiceObjectFrequencyCapFilteringDisabledAppInstallEnabled()
159 AdData original = AdDataFixture.getValidFilterAdDataByBuyer(CommonFixture.VALID_BUYER_1, 1); in testFromServiceObjectBothFiltersEnabled()
172 AdData original = in testFromServiceObjectAdRenderIdDisabled()
284 private void assertEqualsServiceObject(AdData expected, DBAdData test) { in assertEqualsServiceObject()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/data/customaudience/
DAdDataConversionStrategyFactory.java22 import android.adservices.common.AdData;
95 AdData parcelable, DBAdData.Builder adDataBuilder) { in fromServiceObjectAdCounterKeys()
100 public void fromServiceObjectFilters(AdData parcelable, AdFilters.Builder builder) { in fromServiceObjectFilters()
132 AdData parcelable, DBAdData.Builder adDataBuilder) { in fromServiceObjectAdCounterKeys()
137 public void fromServiceObjectFilters(AdData parcelable, AdFilters.Builder builder) { in fromServiceObjectFilters()
161 public void fromServiceObject(AdData parcelable, AdFilters.Builder builder) { in fromServiceObject()
179 public void fromServiceObject(AdData parcelable, AdFilters.Builder builder) { in fromServiceObject()
233 @NonNull AdData parcelable, @NonNull DBAdData.Builder adDataBuilder) { in fromServiceObject()
268 @NonNull AdData parcelable, @NonNull DBAdData.Builder adDataBuilder) { in fromServiceObject()
314 public DBAdData.Builder fromServiceObject(@NonNull AdData parcelable) { in fromServiceObject()
[all …]
/packages/modules/AdServices/adservices/framework/java/android/adservices/adselection/
DAdWithBid.java19 import android.adservices.common.AdData;
41 private final AdData mAdData;
66 public AdWithBid(@NonNull AdData adData, double bid) { in AdWithBid()
74 mAdData = AdData.CREATOR.createFromParcel(in); in AdWithBid()
82 public AdData getAdData() { in getAdData()
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/android/adservices/adselection/
DAdBiddingOutcomeFixture.java19 import android.adservices.common.AdData;
36 final AdData adData = in anAdBiddingOutcomeBuilder()
37 new AdData.Builder() in anAdBiddingOutcomeBuilder()
65 final AdData adData = in anAdBiddingOutcomeBuilderWithBuyerContextualSignals()
66 new AdData.Builder() in anAdBiddingOutcomeBuilderWithBuyerContextualSignals()
/packages/modules/AdServices/adservices/tests/unittest/fixtures/java/com/android/adservices/common/
DDBAdDataFixture.java19 import android.adservices.common.AdData;
34 AdData mirrorAdData = in getValidDbAdDataBuilder()
42 AdData mirrorAdData = in getValidDbAdDataNoFiltersBuilder()
51 AdData mirrorAdData = AdDataFixture.getValidFilterAdDataByBuyer(buyer, sequenceNumber); in getValidDbAdDataNoFiltersBuilder()
89 public static DBAdData convertAdDataToDBAdData(AdData adData) { in convertAdDataToDBAdData()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/utils/
DCustomAudienceTestFixture.java20 import android.adservices.common.AdData;
118 List<AdData> ads = new ArrayList<>(); in createCustomAudience()
124 new AdData.Builder() in createCustomAudience()
153 List<AdData> ads = new ArrayList<>(); in createCustomAudienceWithAdCost()
159 new AdData.Builder() in createCustomAudienceWithAdCost()
185 List<AdData> ads = new ArrayList<>(); in createCustomAudienceWithSubdomains()
191 new AdData.Builder() in createCustomAudienceWithSubdomains()
/packages/modules/AdServices/adservices/tests/cts/src/android/adservices/debuggablects/
DCustomAudienceShellCommandHelper.java20 import android.adservices.common.AdData;
101 private static ImmutableList<AdData> getAdsFromJsonArray(JSONArray jsonArray) in getAdsFromJsonArray()
103 ImmutableList.Builder<AdData> builder = ImmutableList.builder(); in getAdsFromJsonArray()
110 private static AdData getAdFromJson(JSONObject jsonObject) throws JSONException { in getAdFromJson()
111 AdData.Builder builder = in getAdFromJson()
112 new AdData.Builder() in getAdFromJson()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/
DFrequencyCapAdDataValidatorImpl.java19 import android.adservices.common.AdData;
41 @NonNull AdData adData, @NonNull ImmutableCollection.Builder<String> violations) { in addValidation()
47 if (adCounterKeys.size() > AdData.MAX_NUM_AD_COUNTER_KEYS) { in addValidation()
51 AdData.NUM_AD_COUNTER_KEYS_EXCEEDED_FORMAT, in addValidation()
52 AdData.MAX_NUM_AD_COUNTER_KEYS)); in addValidation()
DFrequencyCapAdDataValidator.java19 import android.adservices.common.AdData;
28 public interface FrequencyCapAdDataValidator extends Validator<AdData> {
31 @NonNull AdData adData, @NonNull ImmutableCollection.Builder<String> violations); in addValidation()

1234