/packages/apps/Car/libs/connected-device-lib/tests/unit/src/com/android/car/connecteddevice/ |
D | ConnectedDeviceManagerTest.java | 220 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/ |
D | CarHvacManagerTest.java | 171 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()
|
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 | AppFocusTest.java | 62 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()
|
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 | CarPowerManagementTest.java | 317 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()
|
D | SystemActivityMonitoringServiceTest.java | 134 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/ |
D | SecureBleChannelTest.java | 80 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()
|
D | CarBlePeripheralManagerTest.java | 136 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()
|
D | BleDeviceMessageStreamTest.java | 104 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/ |
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/android_car_api_test/src/android/car/apitest/ |
D | CarAppFocusManagerTest.java | 305 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()
|
D | CarApiTestBase.java | 63 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
|
D | CarSensorManagerTest.java | 58 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
|
D | CarPackageManagerTest.java | 59 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
|
D | CarDiagnosticManagerTest.java | 60 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
|
D | CarTest.java | 60 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); in waitForConnection()
|
/packages/apps/Camera2/src/com/android/camera/util/ |
D | ConcurrentSharedRingBuffer.java | 245 if (mCapacitySemaphore.tryAcquire()) { in swapLeast() 359 if (mPinSemaphore.tryAcquire()) { in tryPin()
|
/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 | IntegerConsumer.java | 43 tryAcquire(timeout, TimeUnit.MILLISECONDS); in get()
|
D | BooleanConsumer.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/ManagedProvisioning/src/com/android/managedprovisioning/task/ |
D | StartManagedProfileTask.java | 140 return semaphore.tryAcquire(USER_UNLOCKED_TIMEOUT_SECONDS, TimeUnit.SECONDS); in waitForUserUnlocked()
|