Home
last modified time | relevance | path

Searched refs:ApiKey (Results 1 – 25 of 47) sorted by relevance

12

/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/
DThrottler.java42 public enum ApiKey { enum in Throttler
118 private final ConcurrentHashMap<Pair<ApiKey, String>, RateLimiter> mSdkRateLimitMap =
125 private final Map<ApiKey, Double> mRateLimitPerApiMap = new HashMap<>();
162 public boolean tryAcquire(ApiKey apiKey, String requester) { in tryAcquire()
180 for (var key : ApiKey.values()) { in setRateLimitPerApiMap()
221 mRateLimitPerApiMap.put(ApiKey.ADID_API_APP_PACKAGE_NAME, adIdPermitsPerSecond); in setRateLimitPerApiMap()
222 mRateLimitPerApiMap.put(ApiKey.APPSETID_API_APP_PACKAGE_NAME, appSetIdPermitsPerSecond); in setRateLimitPerApiMap()
224 mRateLimitPerApiMap.put(ApiKey.MEASUREMENT_API_REGISTER_SOURCE, registerSource); in setRateLimitPerApiMap()
225 mRateLimitPerApiMap.put(ApiKey.MEASUREMENT_API_REGISTER_TRIGGER, registerTrigger); in setRateLimitPerApiMap()
226 mRateLimitPerApiMap.put(ApiKey.MEASUREMENT_API_REGISTER_WEB_SOURCE, registerWebSource); in setRateLimitPerApiMap()
[all …]
DProtectedSignalsServiceFilter.java70 @NonNull Throttler.ApiKey apiKey, in filterRequest()
105 @NonNull Throttler.ApiKey apiKey, in filterRequestAndExtractIdentifier()
DCustomAudienceServiceFilter.java91 @NonNull Throttler.ApiKey apiKey, in filterRequest()
154 @NonNull Throttler.ApiKey apiKey, in filterRequestAndExtractIdentifier()
DAbstractFledgeServiceFilter.java206 final String callerPackageName, Throttler.ApiKey apiKey, int apiName) in assertCallerNotThrottled()
232 @NonNull Throttler.ApiKey apiKey, in filterRequest()
DFledgeApiThrottleFilter.java52 final String callerPackageName, Throttler.ApiKey apiKey, int apiName) in assertCallerNotThrottled()
DAdSelectionServiceFilter.java81 @NonNull Throttler.ApiKey apiKey, in filterRequest()
/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/
DThrottlerTest.java19 import static com.android.adservices.service.common.Throttler.ApiKey.ADID_API_APP_PACKAGE_NAME;
20 import static com.android.adservices.service.common.Throttler.ApiKey.APPSETID_API_APP_PACKAGE_NAME;
21 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIEN…
22 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_GET_AD_SELECTION_DA…
23 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_JOIN_CUSTOM_AUDIENC…
24 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_LEAVE_CUSTOM_AUDIEN…
25 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_PERSIST_AD_SELECTIO…
26 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_REPORT_IMPRESSIONS;
27 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION;
28 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_SCHEDULE_CUSTOM_AUD…
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/common/
DCustomAudienceServiceFilterTest.java128 Throttler.ApiKey.UNKNOWN, in testFilterRequest_invalidPackageName_throws()
149 Throttler.ApiKey.UNKNOWN, in testFilterRequest_throttled_throws()
170 Throttler.ApiKey.UNKNOWN, in testFilterRequest_enforceForegroundTrue_foregroundCheckFails_throws()
188 Throttler.ApiKey.UNKNOWN, in testFilterRequest_enforceForegroundFalse_foregroundCheckFails_succeeds()
226 Throttler.ApiKey.UNKNOWN, in testFilterRequest_adTechNotAuthorized_throws()
254 Throttler.ApiKey.UNKNOWN, in testFilterRequest_withLocalhostDomain_doesNotPass()
268 Throttler.ApiKey.UNKNOWN, in testFilterRequest_withDeveloperMode_succeeds()
293 Throttler.ApiKey.UNKNOWN, in testFilterRequest_withLocalhostDomainInDeveloperMode_skipCheck()
310 Throttler.ApiKey.UNKNOWN, in testFilterRequest_nullAdTech_skipCheck()
334 Throttler.ApiKey.UNKNOWN, in testFilterRequest_appNotInAllowlist_throws()
[all …]
DAdSelectionServiceFilterTest.java125 Throttler.ApiKey.UNKNOWN, in testFilterRequest_noExceptionsThrown_succeeds()
143 Throttler.ApiKey.UNKNOWN, in testFilterRequestThrowsCallerMismatchExceptionWithInvalidPackageName()
168 Throttler.ApiKey.UNKNOWN, in testFilterRequest_throttled_throwsLimitExceededException()
192 Throttler.ApiKey.UNKNOWN, in testFilterRequestThrowsWrongCallingApplicationStateExceptionIfForegroundCheckFails()
213 Throttler.ApiKey.UNKNOWN, in testFilterRequestSucceedsForBackgroundAppsWhenEnforceForegroundFalse()
251 Throttler.ApiKey.UNKNOWN, in testFilterRequestThrowsAdTechNotAllowedExceptionWhenAdTechNotAuthorized()
275 Throttler.ApiKey.UNKNOWN, in testFilterRequestThrowsAppNotAllowedExceptionWhenAppNotInAllowlist()
300 Throttler.ApiKey.UNKNOWN, in testFilterRequest_apiConsentRevoked_throwsRevokedConsentException()
322 Throttler.ApiKey.UNKNOWN, in testFilterRequest_apiConsentRevoked_enforceConsentFalse_succeeds()
336 Throttler.ApiKey.UNKNOWN, in testFilterRequestDoesNotDoEnrollmentCheckWhenAdTechParamIsNull()
[all …]
DProtectedSignalsServiceFilterTest.java126 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_invalidPackageName_throws()
148 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_throttled_throws()
170 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_enforceForegroundTrue_foregroundCheckFails()
199 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_enforceForegroundFalse_foregroundCheckFails()
235 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_enableEnrollmentCheck_invalidAdTech_throws()
252 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_disableEnrollmentCheck_eTLDPlus1NotExtracted()
295 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_appNotInAllowlist_throws()
319 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_enforceConsentTrue_hasUserConsentForApp()
350 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_enforceConsentTrue_lacksUserConsentForApp()
378 Throttler.ApiKey.UNKNOWN, in testFilterRequestAndExtractIdentifier_enforceConsentFalse_lacksUserConsentForApp()
[all …]
DFledgeApiThrottleFilterTest.java63 Throttler.ApiKey.FLEDGE_API_SELECT_ADS, in testAssertCallerNotThrottled_notThrottled_doesNotThrowOrLogError()
83 Throttler.ApiKey.FLEDGE_API_SELECT_ADS, in testAssertCallerNotThrottled_throttled_throwsAndLogsError()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/measurement/
DMeasurementServiceImpl.java203 final Throttler.ApiKey apiKey = getApiKey(request); in register()
281 final Throttler.ApiKey apiKey = Throttler.ApiKey.MEASUREMENT_API_REGISTER_WEB_SOURCE; in registerWebSource()
356 final Throttler.ApiKey apiKey = Throttler.ApiKey.MEASUREMENT_API_REGISTER_SOURCES; in registerSource()
425 final Throttler.ApiKey apiKey = Throttler.ApiKey.MEASUREMENT_API_REGISTER_WEB_TRIGGER; in registerWebTrigger()
496 final Throttler.ApiKey apiKey = Throttler.ApiKey.MEASUREMENT_API_DELETION_REGISTRATION; in deleteRegistrations()
722 String appPackageName, Throttler.ApiKey apiKey, IMeasurementCallback callback) { in isThrottled()
884 private Throttler.ApiKey getApiKey(RegistrationRequest request) { in getApiKey()
886 ? Throttler.ApiKey.MEASUREMENT_API_REGISTER_SOURCE in getApiKey()
887 : Throttler.ApiKey.MEASUREMENT_API_REGISTER_TRIGGER; in getApiKey()
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/customaudience/
DFetchCustomAudienceImplTest.java277 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in setup()
291 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in setup()
367 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_invalidPackageName_throws()
406 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_throttled_throws()
445 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_failedForegroundCheck_throws()
485 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_failedEnrollmentCheck_throws()
526 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_appCannotUsePPAPI_throws()
563 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_revokedConsent_failsSilently()
599 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_revokedConsent_failsSilentlyUXNotificationDisabled()
627 Throttler.ApiKey.FLEDGE_API_FETCH_CUSTOM_AUDIENCE, in testImpl_revokedConsent_failsSilentlyUXNotificationDisabled()
[all …]
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/adselection/
DOutcomeSelectionRunnerTest.java185 Throttler.ApiKey.FLEDGE_API_SELECT_ADS, in setup()
240 Throttler.ApiKey.FLEDGE_API_SELECT_ADS, in testRunOutcomeSelectionRevokedUserConsentEmptyResult()
294 Throttler.ApiKey.FLEDGE_API_SELECT_ADS, in testRunOutcomeSelectionRevokedUserConsentEmptyResult_UXNotificationNotEnforced()
358 Throttler.ApiKey.FLEDGE_API_SELECT_ADS, in testRunOutcomeSelectionRevokedUserConsentEmptyResult_UXNotificationNotEnforced()
DReportAndRegisterEventImplTest.java577 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWithInvalidPackageName()
624 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenForegroundCheckFails()
674 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenThrottled()
732 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenAppNotInAllowList()
768 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsSilentlyWithoutConsent()
DAppInstallAdvertisersSetterTest.java135 Throttler.ApiKey.FLEDGE_API_SET_APP_INSTALL_ADVERTISERS, in testSetAppInstallAdvertisersSuccess()
172 Throttler.ApiKey.FLEDGE_API_SET_APP_INSTALL_ADVERTISERS, in testSetAppInstallAdvertisersSuccessWithUxNotificationEnforcementDisabled()
DReportEventImplTest.java430 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplSuccessfullyReportsRegisteredInteractionsWithUXNotificationEnforcementDisabled()
1024 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWithInvalidPackageName()
1097 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenForegroundCheckFails()
1209 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenThrottled()
1281 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenAppNotInAllowList()
1344 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsSilentlyWithoutConsent()
DReportAndRegisterEventFallbackImplTest.java820 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWithInvalidPackageName()
877 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenForegroundCheckFails()
937 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenThrottled()
1021 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsWhenAppNotInAllowList()
1067 Throttler.ApiKey.FLEDGE_API_REPORT_INTERACTION, in testImplFailsSilentlyWithoutConsent()
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsetid/src/com/android/adservices/service/appsetid/
DAppSetIdServiceImplTest.java119 eq(Throttler.ApiKey.APPSETID_API_APP_PACKAGE_NAME), anyString())) in setup()
149 eq(Throttler.ApiKey.APPSETID_API_APP_PACKAGE_NAME), anyString())) in checkThrottler_rateLimitReached_forAppPackageName()
/packages/modules/AdServices/adservices/tests/unittest/service-core/adid/src/com/android/adservices/service/adid/
DAdIdServiceImplTest.java134 when(mMockThrottler.tryAcquire(eq(Throttler.ApiKey.ADID_API_APP_PACKAGE_NAME), anyString())) in setup()
162 when(mMockThrottler.tryAcquire(eq(Throttler.ApiKey.ADID_API_APP_PACKAGE_NAME), anyString())) in checkThrottler_rateLimitReached_forAppPackageName()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/topics/
DTopicsServiceImpl.java264 Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME, in isThrottled()
267 Throttler.ApiKey.TOPICS_API_SDK_NAME, topicsParam.getSdkName()); in isThrottled()
/packages/modules/AdServices/adservices/tests/unittest/service-core/topics/src/com/android/adservices/service/topics/
DTopicsServiceImplTest.java267 when(mMockThrottler.tryAcquire(eq(Throttler.ApiKey.TOPICS_API_SDK_NAME), anyString())) in setup()
270 eq(Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME), anyString())) in setup()
366 when(mMockThrottler.tryAcquire(eq(Throttler.ApiKey.TOPICS_API_SDK_NAME), anyString())) in checkThrottler_rateLimitReached_forSdkName()
385 eq(Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME), anyString())) in checkThrottler_rateLimitReached_forAppPackageName()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/appsetid/
DAppSetIdServiceImpl.java155 Throttler.ApiKey.APPSETID_API_APP_PACKAGE_NAME, in isThrottled()
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/adselection/
DAppInstallAdvertisersSetter.java22 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_SET_APP_INSTALL_ADV…
DUpdateAdCounterHistogramWorker.java26 import static com.android.adservices.service.common.Throttler.ApiKey.FLEDGE_API_UPDATE_AD_COUNTER_H…

12