/packages/modules/AdServices/adservices/tests/unittest/service-core/src/com/android/adservices/service/common/ |
D | ThrottlerTest.java | 73 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_SDK_NAME, "sdk1")).isTrue(); in testTryAcquire_skdName() 74 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_SDK_NAME, "sdk1")).isFalse(); in testTryAcquire_skdName() 77 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_SDK_NAME, "sdk2")).isTrue(); in testTryAcquire_skdName() 83 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_SDK_NAME, "sdk1")).isTrue(); in testTryAcquire_skdName() 84 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_SDK_NAME, "sdk2")).isTrue(); in testTryAcquire_skdName() 95 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME, "app1")) in testTryAcquire_appPackageName() 97 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME, "app1")) in testTryAcquire_appPackageName() 100 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_SDK_NAME, "sdk1")).isTrue(); in testTryAcquire_appPackageName() 103 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME, "app2")) in testTryAcquire_appPackageName() 110 assertThat(throttler.tryAcquire(Throttler.ApiKey.TOPICS_API_APP_PACKAGE_NAME, "app1")) in testTryAcquire_appPackageName() [all …]
|
/packages/services/Car/tests/CarServiceTest/src/com/android/car/ |
D | CarHvacManagerTest.java | 189 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 190 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 191 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 192 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 193 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 204 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 217 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 230 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 243 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testUnregisterCallback() 244 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testUnregisterCallback() [all …]
|
D | CarProjectionManagerTest.java | 88 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testShortPressListener() 100 assertTrue(mLongAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testLongPressListener() 113 assertTrue(mLongAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testMixedPressListener() 119 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testMixedPressListener()
|
D | CarCabinManagerTest.java | 147 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 148 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 159 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent() 172 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
|
D | AppFocusTest.java | 71 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
|
/packages/apps/Launcher3/quickstep/tests/multivalentTests/src/com/android/quickstep/ |
D | AllAppsActionManagerTest.kt | 77 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in destroyManager() 84 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in homeAndOverviewSame_actionRegistered() 91 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in toggleTaskbar_destroyedAfterActionRegistered_actionUnregistered() 104 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in toggleTaskbar_destroyedBeforeActionRegistered_pendingActionUnregistered() 111 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in changeHome_sameAsOverviewBeforeActionUnregistered_actionRegisteredAgain() 115 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in changeHome_sameAsOverviewBeforeActionUnregistered_actionRegisteredAgain() 139 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in taskbarPresent_userSetupCompleted_actionRegistered() 149 assertThat(callbackSemaphore.tryAcquire(TIMEOUT, SECONDS)).isTrue() in taskbarPresent_setupUiDismissed_actionRegistered()
|
/packages/modules/AdServices/adservices/apk/java/com/android/adservices/ui/settings/ |
D | DialogManager.java | 52 if (!sSemaphore.tryAcquire()) return; in showOptOutDialog() 79 if (!sSemaphore.tryAcquire()) return; in showBlockTopicDialog() 107 if (!sSemaphore.tryAcquire()) return; in showUnblockTopicDialog() 130 if (!sSemaphore.tryAcquire()) return; in showResetTopicDialog() 163 if (!sSemaphore.tryAcquire()) return; in showBlockAppDialog() 193 if (!sSemaphore.tryAcquire()) return; in showUnblockAppDialog() 213 if (!sSemaphore.tryAcquire()) return; in showResetAppDialog()
|
/packages/modules/OnDevicePersonalization/federatedcompute/src/com/android/federatedcompute/services/statsd/ |
D | FederatedComputeStatsdLogger.java | 57 if (mRateLimiter.tryAcquire()) { in logApiCallStats() 70 if (mRateLimiter.tryAcquire()) { in logTraceEventStats() 84 if (mRateLimiter.tryAcquire()) { in logTrainingEventReported() 107 if (mRateLimiter.tryAcquire()) { in recordExampleIteratorLatencyMetrics()
|
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ringbuffer/ |
D | DynamicRingBuffer.java | 122 return mTicketPool.tryAcquire(); in tryAcquireLowPriorityTicket() 179 public Ticket tryAcquire() { in tryAcquire() method in DynamicRingBuffer 185 return mTicketPool.tryAcquire(); in tryAcquire()
|
/packages/services/Car/tests/CarServiceTest/src/com/android/car/power/ |
D | CarPowerManagementServiceTest.java | 501 if (completionSemaphore.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, in testSleepShutdownFromPreShutdownPrepare() 523 assertThat(eventWaitSemaphore.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, in testSleepShutdownFromPreShutdownPrepare() 564 if (completionSemaphore.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, in testShutdownImmediatelyFromPreShutdownPrepare() 586 assertThat(eventWaitSemaphore.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, in testShutdownImmediatelyFromPreShutdownPrepare() 647 if (!notificationSem.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, in testShutdownPostponeWhileListenerPendingInState() 782 mDisplayStateWait.tryAcquire(MockedCarTestBase.SHORT_WAIT_TIMEOUT_MS, in waitForDisplayState() 891 if (!mSubscriptionWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForSubscription() 899 if (!mSetWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForStateSetAndGetAll() 944 if (!mSetWaitSemaphore.tryAcquire(STATE_TRANSITION_MAX_WAIT_MS, in sendStateAndExpectNoResponse()
|
/packages/modules/AdServices/adservices/service-core/java/com/android/adservices/service/common/ |
D | Throttler.java | 162 public boolean tryAcquire(ApiKey apiKey, String requester) { in tryAcquire() method in Throttler 173 return rateLimiter.tryAcquire(); in tryAcquire() 288 boolean unused = rateLimiter.tryAcquire(); in create()
|
D | FledgeApiThrottleFilter.java | 55 boolean isThrottled = !mThrottler.tryAcquire(apiKey, callerPackageName); in assertCallerNotThrottled()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/protectedaudience/src/com/android/adservices/service/common/ |
D | FledgeApiThrottleFilterTest.java | 59 when(mThrottlerMock.tryAcquire(any(), anyString())).thenReturn(true); in testAssertCallerNotThrottled_notThrottled_doesNotThrowOrLogError() 76 when(mThrottlerMock.tryAcquire(any(), anyString())).thenReturn(false); in testAssertCallerNotThrottled_throttled_throwsAndLogsError()
|
/packages/services/Car/tests/CarServiceTest/src/com/android/car/evs/ |
D | CarEvsManagerTest.java | 126 mFrameReceivedSignal.tryAcquire(FRAME_TIMEOUT_MS, TimeUnit.MILLISECONDS) in testStartAndStopVideoStream() 196 if (!mStreamEventOccurred.tryAcquire(STREAM_EVENT_TIMEOUT_SEC, in waitForStreamEvent()
|
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ticketpool/ |
D | TicketProvider.java | 30 public Ticket tryAcquire(); in tryAcquire() method
|
D | TicketPool.java | 68 public Ticket tryAcquire(); in tryAcquire() method
|
D | FiniteTicketPool.java | 170 public Ticket tryAcquire() { in tryAcquire() method in FiniteTicketPool
|
/packages/apps/Settings/src/com/android/settings/network/ims/ |
D | BooleanConsumer.java | 43 tryAcquire(timeout, TimeUnit.MILLISECONDS); in get()
|
D | IntegerConsumer.java | 43 tryAcquire(timeout, TimeUnit.MILLISECONDS); in get()
|
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ |
D | TicketRequiredFilter.java | 44 Ticket ticket = mTicketProvider.tryAcquire(); in update()
|
/packages/apps/Camera2/src/com/android/camera/util/ |
D | ConcurrentSharedRingBuffer.java | 245 if (mCapacitySemaphore.tryAcquire()) { in swapLeast() 359 if (mPinSemaphore.tryAcquire()) { in tryPin()
|
/packages/services/Car/libs/car-test-lib/src/android/car/test/mocks/ |
D | JavaMockitoHelper.java | 65 if (!semaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in await()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/appsetid/src/com/android/adservices/service/appsetid/ |
D | AppSetIdServiceImplTest.java | 118 when(mMockThrottler.tryAcquire( in setup() 148 when(mMockThrottler.tryAcquire( in checkThrottler_rateLimitReached_forAppPackageName()
|
/packages/modules/AdServices/adservices/tests/unittest/service-core/adid/src/com/android/adservices/service/adid/ |
D | AdIdServiceImplTest.java | 134 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/services/Car/tests/CarServiceTest/src/com/android/car/input/ |
D | CarInputManagerTest.java | 155 mStateChangeWait.tryAcquire(EVENT_WAIT_TIME, TimeUnit.MILLISECONDS)).isTrue(); in waitForStateChange() 160 mKeyEventWait.tryAcquire(EVENT_WAIT_TIME, TimeUnit.MILLISECONDS)).isTrue(); in waitForKeyEvent() 165 mRotaryEventWait.tryAcquire(EVENT_WAIT_TIME, TimeUnit.MILLISECONDS)).isTrue(); in waitForRotaryEvent() 170 mCustomInputEventWait.tryAcquire( in waitForCustomInputEvent()
|