/frameworks/data-binding/integration-tests/TestApp/app/src/androidTestApi7/java/android/databinding/testapp/ |
InvalidateAllTest.java | 34 assertTrue(semaphore.tryAcquire(2, TimeUnit.SECONDS)); 40 assertTrue(semaphore.tryAcquire(2, TimeUnit.SECONDS));
|
/libcore/jsr166-tests/src/test/java/jsr166/ |
SemaphoreTest.java | 121 tryAcquire() { 123 assertTrue(s.tryAcquire()); 128 assertTrue(s.tryAcquire(permits)); 133 assertTrue(s.tryAcquire(2 * LONG_DELAY_MS, MILLISECONDS)); 138 assertTrue(s.tryAcquire(permits, 2 * LONG_DELAY_MS, MILLISECONDS)); 180 * tryAcquire succeeds when sufficient permits, else fails 187 assertTrue(s.tryAcquire()); 188 assertTrue(s.tryAcquire()); 190 assertFalse(s.tryAcquire()); 191 assertFalse(s.tryAcquire()); [all...] |
/packages/services/Car/tests/android_support_car_api_test/src/com/android/support/car/apitest/ |
TestAction.java | 51 if (!mWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { 60 if (!mWaitSemaphore.tryAcquire(waitMs, TimeUnit.MILLISECONDS)) { 71 if (mWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) {
|
CarConnectionListenerTest.java | 71 if (!mWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { 80 if (!mWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) {
|
CarApiTestBase.java | 63 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
CarPackageManagerTest.java | 67 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ticketpool/ |
TicketProvider.java | 30 public Ticket tryAcquire();
|
/external/guava/guava-tests/test/com/google/common/util/concurrent/ |
RateLimiterTest.java | 63 assertTrue("Unable to acquire initial permit", r.tryAcquire()); 64 assertFalse("Capable of acquiring secondary permit", r.tryAcquire()); 96 limiter.tryAcquire(0); 101 limiter.tryAcquire(-1); 106 limiter.tryAcquire(0, 1, SECONDS); 111 limiter.tryAcquire(-1, 1, SECONDS); 250 assertTrue(limiter.tryAcquire(0, SECONDS)); 251 assertFalse(limiter.tryAcquire(0, SECONDS)); 252 assertFalse(limiter.tryAcquire(0, SECONDS)); 254 assertFalse(limiter.tryAcquire(0, SECONDS)) [all...] |
/packages/services/Car/tests/carservice_test/src/com/android/car/test/ |
AudioRoutingPolicyTest.java | 112 assertTrue(mWaitSemaphore.tryAcquire(TIMEOUT_MS, TimeUnit.MILLISECONDS)); 133 assertTrue(mWaitSemaphore.tryAcquire(TIMEOUT_MS, TimeUnit.MILLISECONDS)); 134 assertTrue(mWaitSemaphore.tryAcquire(TIMEOUT_MS, TimeUnit.MILLISECONDS));
|
MockedCarTestBase.java | 89 assertTrue(mConnectionWaitForCar.tryAcquire(DEFAULT_WAIT_TIMEOUT_MS, TimeUnit.MILLISECONDS) 132 return mConnectionWaitForSupportCar.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
CarHvacManagerTest.java | 153 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); 164 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS)); 175 assertTrue(mAvailable.tryAcquire(2L, TimeUnit.SECONDS));
|
/packages/services/Car/tests/carservice_test/src/com/android/support/car/test/ |
CarConnectionListenerInMockingTest.java | 72 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS); 121 if (!mWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { 131 if (!mWaitSemaphore.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) {
|
AppContextTest.java | 70 if (!mChangeWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) { 92 if (!mLossEventWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS)) {
|
/cts/hostsidetests/devicepolicy/app/ManagedProfile/src/com/android/cts/managedprofile/ |
TestActivity.java | 40 return mActivityStartedSemaphore.tryAcquire(5, TimeUnit.SECONDS);
|
/external/guava/guava/src/com/google/common/util/concurrent/ |
Uninterruptibles.java | 290 * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) 291 * tryAcquire(1, timeout, unit)} uninterruptibly. 301 * Invokes {@code semaphore.}{@link Semaphore#tryAcquire(int, long, TimeUnit) 302 * tryAcquire(permits, timeout, unit)} uninterruptibly. 316 return semaphore.tryAcquire(permits, remainingNanos, NANOSECONDS);
|
/cts/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/ |
ApplicationHiddenTest.java | 109 if (!mAddedSemaphore.tryAcquire(60, TimeUnit.SECONDS)) { 115 if (!mRemovedSemaphore.tryAcquire(60, TimeUnit.SECONDS)) {
|
/cts/tests/tests/car/src/android/car/cts/ |
CarApiTestBase.java | 63 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
CarTest.java | 58 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
/frameworks/volley/src/test/java/com/android/volley/mock/ |
WaitableQueue.java | 38 if (!mStopEvent.tryAcquire(timeoutMillis, TimeUnit.MILLISECONDS)) {
|
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ |
TicketRequiredFilter.java | 44 Ticket ticket = mTicketProvider.tryAcquire();
|
/packages/services/Car/tests/android_car_api_test/src/com/android/car/apitest/ |
CarApiTestBase.java | 63 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
CarPackageManagerTest.java | 59 mConnectionWait.tryAcquire(timeoutMs, TimeUnit.MILLISECONDS);
|
/cts/tests/tests/telecom/src/android/telecom/cts/ |
BaseRemoteTelecomTest.java | 111 if (!remoteConnectionService.lock.tryAcquire(TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, 134 if (!remoteConnectionService.lock.tryAcquire(TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS, 172 if (!remoteConnectionService.lock.tryAcquire(TestUtils.WAIT_FOR_STATE_CHANGE_TIMEOUT_MS,
|
/libcore/luni/src/main/java/java/util/concurrent/ |
Semaphore.java | 104 * Also note that the untimed {@link #tryAcquire() tryAcquire} methods do not 327 * fair ordering policy, a call to {@code tryAcquire()} <em>will</em> 333 * {@link #tryAcquire(long, TimeUnit) tryAcquire(0, TimeUnit.SECONDS) } 339 public boolean tryAcquire() { 384 public boolean tryAcquire(long timeout, TimeUnit unit) 491 * policy, a call to {@code tryAcquire} <em>will</em> 496 * honor the fairness setting, then use {@link #tryAcquire(int, 497 * long, TimeUnit) tryAcquire(permits, 0, TimeUnit.SECONDS) [all...] |
/packages/apps/Camera2/src/com/android/camera/one/v2/sharedimagereader/ringbuffer/ |
DynamicRingBuffer.java | 122 return mTicketPool.tryAcquire(); 179 public Ticket tryAcquire() { 185 return mTicketPool.tryAcquire();
|