Home
last modified time | relevance | path

Searched refs:tryAcquire (Results 1 – 25 of 36) sorted by relevance

12

/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/
DConnectedDeviceManagerTest.java220 assertThat(tryAcquire(semaphore)).isTrue(); in connectionCallback_onDeviceConnectedInvokedForNewlyConnectedDevice()
241 assertThat(tryAcquire(semaphore)).isFalse(); in connectionCallback_onDeviceConnectedNotInvokedDeviceConnectedForDifferentUser()
253 assertThat(tryAcquire(semaphore)).isFalse(); in connectionCallback_onDeviceConnectedNotInvokedForDifferentBleManager()
265 assertThat(tryAcquire(semaphore)).isTrue(); in connectionCallback_onDeviceDisconnectedInvokedForActiveUserDevice()
282 assertThat(tryAcquire(semaphore)).isFalse(); in connectionCallback_onDeviceDisconnectedNotInvokedDeviceForDifferentUser()
294 assertThat(tryAcquire(semaphore)).isFalse(); in unregisterConnectionCallback_removesCallbackAndNotInvoked()
322 assertThat(tryAcquire(firstSemaphore)).isTrue(); in registerDeviceCallback_blacklistsDuplicateRecipientId()
323 assertThat(tryAcquire(secondSemaphore)).isTrue(); in registerDeviceCallback_blacklistsDuplicateRecipientId()
333 assertThat(tryAcquire(thirdSemaphore)).isTrue(); in registerDeviceCallback_blacklistsDuplicateRecipientId()
351 assertThat(tryAcquire(semaphore)).isTrue(); in deviceCallback_onSecureChannelEstablishedInvoked()
[all …]
/packages/services/Car/tests/carservice_test/src/com/android/car/
DCarHvacManagerTest.java171 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
172 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
173 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
174 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
185 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
198 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
211 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); in testEvent()
DCarProjectionManagerTest.java88 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()
DAppFocusTest.java62 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
89 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
98 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
DCarCabinManagerTest.java147 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()
DCarPowerManagementTest.java317 mDisplayStateWait.tryAcquire(MockedCarTestBase.SHORT_WAIT_TIMEOUT_MS, in waitForDisplayState()
380 if (!mSubscriptionWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForSubscription()
388 if (!mSetWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForStateSetAndGetAll()
421 if (!mSetWaitSemaphore.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in sendStateAndExpectNoResponse()
DSystemActivityMonitoringServiceTest.java134 mActivityLaunchSemaphore.tryAcquire(DEFAULT_TIMEOUT_SECONDS, TimeUnit.SECONDS); in waitUntil()
177 assertTrue(mActivityLaunchSemaphore.tryAcquire(DEFAULT_TIMEOUT_SECONDS, TimeUnit.SECONDS)); in assertTopTaskActivity()
/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ble/
DSecureBleChannelTest.java80 assertThat(semaphore.tryAcquire(100, TimeUnit.MILLISECONDS)).isTrue(); in testEncryptionHandshake_Association()
99 assertThat(semaphore.tryAcquire(100, TimeUnit.MILLISECONDS)).isTrue(); in testEncryptionHandshake_Association()
111 assertThat(semaphore.tryAcquire(100, TimeUnit.MILLISECONDS)).isTrue(); in testEncryptionHandshake_Association_wrongInitHandshakeMessage()
115 assertThat(semaphore.tryAcquire(100, TimeUnit.MILLISECONDS)).isTrue(); in testEncryptionHandshake_Association_wrongInitHandshakeMessage()
129 assertThat(semaphore.tryAcquire(100, TimeUnit.MILLISECONDS)).isTrue(); in testEncryptionHandshake_Association_wrongRespondToContinueMessage()
135 assertThat(semaphore.tryAcquire(100, TimeUnit.MILLISECONDS)).isTrue(); in testEncryptionHandshake_Association_wrongRespondToContinueMessage()
DCarBlePeripheralManagerTest.java136 assertThat(tryAcquire(semaphore)).isTrue(); in testStartAssociationAdvertisingFailure()
153 assertThat(tryAcquire(semaphore)).isTrue(); in testNotifyAssociationSuccess()
163 assertThat(tryAcquire(semaphore)).isTrue(); in testShowVerificationCode()
182 assertThat(tryAcquire(semaphore)).isTrue(); in testAssociationSuccess()
196 assertThat(tryAcquire(semaphore)).isTrue(); in testAssociationFailure_channelError()
230 private boolean tryAcquire(Semaphore semaphore) throws InterruptedException { in tryAcquire() method in CarBlePeripheralManagerTest
231 return semaphore.tryAcquire(100, TimeUnit.MILLISECONDS); in tryAcquire()
DBleDeviceMessageStreamTest.java104 assertThat(tryAcquire(semaphore)).isTrue(); in processPacket_notifiesWithEntireMessageForSinglePacketMessage()
117 assertThat(tryAcquire(semaphore)).isTrue(); in processPacket_notifiesWithEntireMessageForMultiPacketMessage()
140 assertThat(tryAcquire(semaphore)).isTrue(); in processPacket_receivingMultipleMessagesInParallelParsesSuccessfully()
164 assertThat(tryAcquire(semaphore)).isFalse(); in processPacket_doesNotNotifyOfNewMessageIfNotAllPacketsReceived()
189 private boolean tryAcquire(Semaphore semaphore) throws InterruptedException { in tryAcquire() method in BleDeviceMessageStreamTest
190 return semaphore.tryAcquire(100, TimeUnit.MILLISECONDS); in tryAcquire()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ringbuffer/
DDynamicRingBuffer.java122 return mTicketPool.tryAcquire(); in tryAcquireLowPriorityTicket()
179 public Ticket tryAcquire() { in tryAcquire() method in DynamicRingBuffer
185 return mTicketPool.tryAcquire(); in tryAcquire()
/packages/services/Car/tests/android_car_api_test/src/android/car/apitest/
DCarAppFocusManagerTest.java305 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForFocusChangeAndAssert()
338 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipLossAndAssert()
347 if (!mGrantEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { in waitForOwnershipGrantAndAssert()
DCarApiTestBase.java63 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarSensorManagerTest.java58 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarPackageManagerTest.java59 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarDiagnosticManagerTest.java60 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
DCarTest.java60 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
/packages/apps/Camera2/src/com/android/camera/util/
DConcurrentSharedRingBuffer.java245 if (mCapacitySemaphore.tryAcquire()) { in swapLeast()
359 if (mPinSemaphore.tryAcquire()) { in tryPin()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ticketpool/
DTicketProvider.java30 public Ticket tryAcquire(); in tryAcquire() method
DTicketPool.java68 public Ticket tryAcquire(); in tryAcquire() method
DFiniteTicketPool.java170 public Ticket tryAcquire() { in tryAcquire() method in FiniteTicketPool
/packages/apps/Settings/src/com/android/settings/network/ims/
DIntegerConsumer.java43 tryAcquire(timeout, TimeUnit.MILLISECONDS); in get()
DBooleanConsumer.java43 tryAcquire(timeout, TimeUnit.MILLISECONDS); in get()
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/
DTicketRequiredFilter.java44 Ticket ticket = mTicketProvider.tryAcquire(); in update()
/packages/apps/ManagedProvisioning/src/com/android/managedprovisioning/task/
DStartManagedProfileTask.java140 return semaphore.tryAcquire(USER_UNLOCKED_TIMEOUT_SECONDS, TimeUnit.SECONDS); in waitForUserUnlocked()

12