/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | CustomAudienceServiceFilterTest.java | 46 import com.android.adservices.service.devapi.DevContext; 127 DevContext.createForDevOptionsDisabled())); in testFilterRequest_invalidPackageName_throws() 147 DevContext.createForDevOptionsDisabled())); in testFilterRequest_throttled_throws() 167 DevContext.createForDevOptionsDisabled())); in testFilterRequest_enforceForegroundTrue_foregroundCheckFails_throws() 184 DevContext.createForDevOptionsDisabled()); in testFilterRequest_enforceForegroundFalse_foregroundCheckFails_succeeds() 220 DevContext.createForDevOptionsDisabled())); in testFilterRequest_adTechNotAuthorized_throws() 246 DevContext.createForDevOptionsDisabled())); in testFilterRequest_withLocalhostDomain_doesNotPass() 259 DevContext.builder() in testFilterRequest_withDeveloperMode_succeeds() 285 DevContext.builder() in testFilterRequest_withLocalhostDomainInDeveloperMode_skipCheck() 304 DevContext.createForDevOptionsDisabled()); in testFilterRequest_nullAdTech_skipCheck() [all …]
|
D | AdSelectionServiceFilterTest.java | 45 import com.android.adservices.service.devapi.DevContext; 125 DevContext.createForDevOptionsDisabled()); in testFilterRequest_noExceptionsThrown_succeeds() 142 DevContext.createForDevOptionsDisabled())); in testFilterRequestThrowsCallerMismatchExceptionWithInvalidPackageName() 166 DevContext.createForDevOptionsDisabled())); in testFilterRequest_throttled_throwsLimitExceededException() 189 DevContext.createForDevOptionsDisabled())); in testFilterRequestThrowsWrongCallingApplicationStateExceptionIfForegroundCheckFails() 209 DevContext.createForDevOptionsDisabled()); in testFilterRequestSucceedsForBackgroundAppsWhenEnforceForegroundFalse() 245 DevContext.createForDevOptionsDisabled())); in testFilterRequestThrowsAdTechNotAllowedExceptionWhenAdTechNotAuthorized() 268 DevContext.createForDevOptionsDisabled())); in testFilterRequestThrowsAppNotAllowedExceptionWhenAppNotInAllowlist() 292 DevContext.createForDevOptionsDisabled())); in testFilterRequest_apiConsentRevoked_throwsRevokedConsentException() 313 DevContext.createForDevOptionsDisabled()); in testFilterRequest_apiConsentRevoked_enforceConsentFalse_succeeds() [all …]
|
D | ProtectedSignalsServiceFilterTest.java | 46 import com.android.adservices.service.devapi.DevContext; 119 DevContext.createForDevOptionsDisabled())); in testFilterRequestAndExtractIdentifier_invalidPackageName_throws() 140 DevContext.createForDevOptionsDisabled())); in testFilterRequestAndExtractIdentifier_throttled_throws() 161 DevContext.createForDevOptionsDisabled())); in testFilterRequestAndExtractIdentifier_enforceForegroundTrue_foregroundCheckFails() 189 DevContext.createForDevOptionsDisabled()); in testFilterRequestAndExtractIdentifier_enforceForegroundFalse_foregroundCheckFails() 224 DevContext.createForDevOptionsDisabled())); in testFilterRequestAndExtractIdentifier_enableEnrollmentCheck_invalidAdTech_throws() 240 DevContext.createForDevOptionsDisabled()); in testFilterRequestAndExtractIdentifier_disableEnrollmentCheck_eTLDPlus1NotExtracted() 282 DevContext.createForDevOptionsDisabled())); in testFilterRequestAndExtractIdentifier_appNotInAllowlist_throws() 305 DevContext.createForDevOptionsDisabled()); in testFilterRequestAndExtractIdentifier_enforceConsentTrue_hasUserConsentForApp() 335 DevContext.createForDevOptionsDisabled())); in testFilterRequestAndExtractIdentifier_enforceConsentTrue_lacksUserConsentForApp() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/devapi/ |
D | DevContext.java | 30 public abstract class DevContext { class 45 public static DevContext.Builder builder() { in builder() 52 public static DevContext createForDevOptionsDisabled() { in createForDevOptionsDisabled() 53 return DevContext.builder().setDevOptionsEnabled(false).build(); in createForDevOptionsDisabled() 60 public abstract DevContext.Builder setDevOptionsEnabled(boolean flag); in setDevOptionsEnabled() 63 public abstract DevContext.Builder setCallingAppPackageName(@Nullable String value); in setCallingAppPackageName() 66 public abstract DevContext build(); in build()
|
D | DevContextFilter.java | 78 public DevContext createDevContext() throws IllegalStateException { in createDevContext() 90 public DevContext createDevContextFromCallingUid(int callingUid) { in createDevContextFromCallingUid() 103 public DevContext createDevContext(int callingAppUid) { in createDevContext() 106 return DevContext.createForDevOptionsDisabled(); in createDevContext() 114 return DevContext.createForDevOptionsDisabled(); in createDevContext() 118 return DevContext.builder() in createDevContext() 127 return DevContext.createForDevOptionsDisabled(); in createDevContext()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/devapi/ |
D | CustomAudienceDevOverridesHelperTest.java | 77 DevContext devContext = in testGetOverridesFindsMatchingOverride() 78 DevContext.builder() in testGetOverridesFindsMatchingOverride() 109 DevContext devContext = in testGetOverridesFindsMatchingOverride_nullJsVersion() 110 DevContext.builder() in testGetOverridesFindsMatchingOverride_nullJsVersion() 136 DevContext devContext = DevContext.createForDevOptionsDisabled(); in testGetOverridesReturnsNullIfDevOptionsAreDisabled() 157 DevContext devContext = in testGetOverridesReturnsNullIfTheOverrideBelongsToAnotherApp() 158 DevContext.builder() in testGetOverridesReturnsNullIfTheOverrideBelongsToAnotherApp()
|
D | AdSelectionDevOverridesHelperTest.java | 113 DevContext devContext = in testGetDecisionLogicOverrideFindsMatchingOverride() 114 DevContext.builder() in testGetDecisionLogicOverrideFindsMatchingOverride() 137 DevContext devContext = DevContext.createForDevOptionsDisabled(); in testGetDecisionLogicOverrideReturnsNullIfDevOptionsAreDisabled() 153 DevContext devContext = in testGetDecisionLogicOverrideReturnsNullIfTheOverrideBelongsToAnotherApp() 154 DevContext.builder() in testGetDecisionLogicOverrideReturnsNullIfTheOverrideBelongsToAnotherApp()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/adselection/ |
D | DebugReportSenderWorkerTest.java | 39 import com.android.adservices.service.devapi.DevContext; 111 .getAndReadNothing(any(Uri.class), any(DevContext.class)); in testRunDebugReportSenderSuccess() 125 .getAndReadNothing(any(Uri.class), any(DevContext.class)); in testRunDebugReportSenderSuccess() 136 when(mHttpsClient.getAndReadNothing(any(Uri.class), any(DevContext.class))) in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 152 .getAndReadNothing(any(Uri.class), any(DevContext.class)); in testRunDebugReportSenderPartialFailureDoesNotBreakOverallSuccess() 164 when(mHttpsClient.getAndReadNothing(any(Uri.class), any(DevContext.class))) in testRunDebugReportSenderDoesNotFailsOnException() 179 .getAndReadNothing(any(Uri.class), any(DevContext.class)); in testRunDebugReportSenderDoesNotFailsOnException() 191 .getAndReadNothing(any(Uri.class), any(DevContext.class)); in testRunDebugReportSenderDoesNothingIfNoDebugReportsToSend() 204 verify(mHttpsClient, never()).getAndReadNothing(any(Uri.class), any(DevContext.class)); in testRunDebugReportSenderDoesNothingIfNoDebugReportsToSend() 219 when(mHttpsClient.getAndReadNothing(any(Uri.class), any(DevContext.class))) in testRunDebugReportSenderThrowsTimeout()
|
D | DebugReportSenderStrategyHttpImplTest.java | 26 import com.android.adservices.service.devapi.DevContext; 47 private DevContext mDevContext; 58 mMockHttpsClient, DevContext.createForDevOptionsDisabled()); in setUp() 59 mDevContext = DevContext.createForDevOptionsDisabled(); in setUp()
|
D | AdSelectionServiceImplTest.java | 154 import com.android.adservices.service.devapi.DevContext; 282 private final DevContext mDevContext = DevContext.createForDevOptionsDisabled(); 421 DevContext.createForDevOptionsDisabled()); in setUp() 430 .thenReturn(DevContext.createForDevOptionsDisabled()); in setUp() 511 .thenReturn(DevContext.createForDevOptionsDisabled()); in testReportImpressionSuccessWithRegisterAdBeaconDisabled() 639 .thenReturn(DevContext.createForDevOptionsDisabled()); in testReportImpressionSuccessCallbackThrowsErrorAuctionServerEnabled() 767 .thenReturn(DevContext.createForDevOptionsDisabled()); in testReportImpressionFailureCallbackThrowsErrorAuctionServerEnabled() 888 .thenReturn(DevContext.createForDevOptionsDisabled()); in testReportImpressionSuccessCallbackThrowsErrorAuctionServerDisabled() 1016 .thenReturn(DevContext.createForDevOptionsDisabled()); in testReportImpressionFailureCallbackThrowsErrorAuctionServerDisabled() 1136 .thenReturn(DevContext.createForDevOptionsDisabled()); in testReportImpressionSuccessfullyReportsAdCost() [all …]
|
D | JsFetcherTest.java | 59 import com.android.adservices.service.devapi.DevContext; 110 private DevContext mDevContext = 111 DevContext.builder() 150 mDevContext = DevContext.createForDevOptionsDisabled(); in setUp() 208 DevContext.builder() in testSuccessfulGetBuyerLogicWithOverride() 228 DevContext.builder() in testSuccessfulGetBuyerLogicWithOverrideWithLogger() 348 .setDevContext(DevContext.createForDevOptionsDisabled()) in testGetOutcomeSelectionLogicJsWithPrebuiltUri_featureDisabled_failure()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/access/ |
D | DevContextAccessResolver.java | 31 import com.android.adservices.service.devapi.DevContext; 40 @NonNull DevContext devContext, in DevContextAccessResolver() 48 @NonNull DevContext devContext, in DevContextAccessResolver() 61 @NonNull DevContext devContext, in DevContextAccessResolver() 74 @NonNull DevContext devContext, in DevContextAccessResolver()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/httpclient/ |
D | AdServicesHttpClientRequest.java | 23 import com.android.adservices.service.devapi.DevContext; 54 public abstract DevContext getDevContext(); in getDevContext() 71 @NonNull DevContext devContext, in create() 141 public abstract AdServicesHttpClientRequest.Builder setDevContext(DevContext devContext); in setDevContext()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/customaudience/ |
D | FetchCustomAudienceImplTest.java | 132 import com.android.adservices.service.devapi.DevContext; 241 DevContext.createForDevOptionsDisabled()); in setup() 253 DevContext.builder().setDevOptionsEnabled(true).build()); in setup() 323 DevContext.createForDevOptionsDisabled()); in testImpl_invalidPackageName_throws() 355 DevContext.createForDevOptionsDisabled()); in testImpl_throttled_throws() 387 DevContext.createForDevOptionsDisabled()); in testImpl_failedForegroundCheck_throws() 420 DevContext.createForDevOptionsDisabled()); in testImpl_failedEnrollmentCheck_throws() 453 DevContext.createForDevOptionsDisabled()); in testImpl_appCannotUsePPAPI_throws() 486 DevContext.createForDevOptionsDisabled()); in testImpl_revokedConsent_failsSilently() 874 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()); in testImpl_runNormally_partialResponse() [all …]
|
D | BackgroundFetchRunnerTest.java | 57 import com.android.adservices.service.devapi.DevContext; 357 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchAndValidateSuccessfulEmptyCustomAudienceUpdatableData() 385 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchAndValidateSuccessfulFullCustomAudienceUpdatableData() 447 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchAndValidateSuccessfulFullCustomAudienceUpdatableDataWithAuctionServerRequestFlagsEnabled() 507 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchAndValidateSuccessfulFullCustomAudienceUpdatableDataWithAuctionServerRequestFlagsDisabled() 574 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchAndValidateCustomAudienceUpdatableDataNetworkTimeout() 606 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchWithInvalidUriAndValidateCustomAudienceUpdatableData() 651 DevContext.createForDevOptionsDisabled().getDevOptionsEnabled()) in testFetchAndValidateCustomAudienceUpdatableDataResponseTooLarge()
|
D | CustomAudienceServiceImplTest.java | 88 import com.android.adservices.service.devapi.DevContext; 172 .doReturn(DevContext.createForDevOptionsDisabled()) in setup() 220 DevContext.createForDevOptionsDisabled()); in testJoinCustomAudience_runNormally() 424 DevContext.createForDevOptionsDisabled()); in testJoinCustomAudience_errorCreateCustomAudience() 441 DevContext.createForDevOptionsDisabled()); in testJoinCustomAudience_errorCreateCustomAudience() 496 DevContext.createForDevOptionsDisabled()); in testJoinCustomAudience_errorReturnCallback() 530 DevContext devContextEnabled = DevContext.builder().setDevOptionsEnabled(true).build(); in testJoinCustomAudience_devOptionsEnabled() 1098 DevContext.createForDevOptionsDisabled()); in testAppImportanceDisabledCallerInBackground_joinCustomAudienceSucceeds() 1215 DevContext.builder() in testAppImportanceTestFails_overrideCustomAudienceThrowsException() 1264 DevContext.builder() in testAppImportanceDisabledCallerInBackground_overrideCustomAudienceSucceeds() [all …]
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/ |
D | DebugReportingEnabled.java | 28 import com.android.adservices.service.devapi.DevContext; 37 private final DevContext mDevContext; 44 @NonNull DevContext devContext, in DebugReportingEnabled()
|
D | AdSelectionServiceImpl.java | 103 import com.android.adservices.service.devapi.DevContext; 429 final DevContext devContext = mDevContextFilter.createDevContext(); in getAdSelectionData() 492 final DevContext devContext = mDevContextFilter.createDevContext(); in persistAdSelectionResult() 602 DevContext devContext = mDevContextFilter.createDevContext(); in selectAds() 621 DevContext devContext, in runGetAdSelectionData() 730 DevContext devContext, in runAdSelection() 789 DevContext devContext, in runAdSelectionWithDebugReporting() 866 DevContext devContext = mDevContextFilter.createDevContext(); in selectAdsFromOutcomes() 912 DevContext devContext = mDevContextFilter.createDevContext(); in reportImpression() 991 DevContext devContext = mDevContextFilter.createDevContext(); in reportInteraction() [all …]
|
D | DebugReportSenderStrategyHttpImpl.java | 25 import com.android.adservices.service.devapi.DevContext; 42 @NonNull private final DevContext mDevContext; 45 @NonNull AdServicesHttpsClient adServicesHttpsClient, @NonNull DevContext devContext) { in DebugReportSenderStrategyHttpImpl()
|
D | DebugReportSenderStrategyBatchImpl.java | 29 import com.android.adservices.service.devapi.DevContext; 52 @NonNull private final DevContext mDevContext; 57 @NonNull DevContext devContext) { in DebugReportSenderStrategyBatchImpl()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/encryption/ |
D | AdSelectionEncryptionKeyManager.java | 38 import com.android.adservices.service.devapi.DevContext; 110 DevContext devContext, in getLatestActiveOhttpKeyConfigOfType() 147 DevContext devContext) { 187 DevContext devContext, 273 DevContext devContext, 297 DevContext devContext,
|
D | ObliviousHttpEncryptor.java | 21 import com.android.adservices.service.devapi.DevContext; 34 DevContext devContext); in encryptBytes()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/customaudience/ |
D | CustomAudienceServiceImpl.java | 77 import com.android.adservices.service.devapi.DevContext; 223 final DevContext devContext = mDevContextFilter.createDevContext(); in joinCustomAudience() 237 @NonNull final DevContext devContext) { in doJoinCustomAudience() 326 final DevContext devContext = mDevContextFilter.createDevContext(); in fetchAndJoinCustomAudience() 409 final DevContext devContext = mDevContextFilter.createDevContext(); in scheduleCustomAudienceUpdate() 462 final DevContext devContext = mDevContextFilter.createDevContext(); in leaveCustomAudience() 476 @NonNull final DevContext devContext) { in doLeaveCustomAudience() 570 DevContext devContext = mDevContextFilter.createDevContext(); in overrideCustomAudienceRemoteInfo() 637 DevContext devContext = mDevContextFilter.createDevContext(); in removeCustomAudienceRemoteInfoOverride() 692 DevContext devContext = mDevContextFilter.createDevContext(); in resetAllCustomAudienceOverrides()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/ |
D | ProtectedSignalsServiceFilter.java | 33 import com.android.adservices.service.devapi.DevContext; 70 @NonNull DevContext devContext) { in filterRequest() 103 DevContext devContext) { in filterRequestAndExtractIdentifier()
|
D | CustomAudienceServiceFilter.java | 33 import com.android.adservices.service.devapi.DevContext; 90 @NonNull DevContext devContext) { in filterRequest() 149 DevContext devContext) { in filterRequestAndExtractIdentifier()
|