Home
last modified time | relevance | path

Searched refs:latch (Results 1 – 25 of 164) sorted by relevance

1234567

/cts/tests/tests/opengl/src/android/opengl/cts/
DOpenGLES20ActivityOne.java96 public OpenGLES20View(Context context, int type, int index, CountDownLatch latch) { in OpenGLES20View() argument
102 mRenderer = new RendererOneShaderTest(latch); in OpenGLES20View()
104 mRenderer = new RendererTwoShaderTest(latch); in OpenGLES20View()
106 mRenderer = new RendererThreeShaderTest(latch); in OpenGLES20View()
108 mRenderer = new RendererFourShaderTest(latch); in OpenGLES20View()
110 mRenderer = new RendererFiveShaderTest(latch); in OpenGLES20View()
112 mRenderer = new RendererSixShaderTest(latch); in OpenGLES20View()
114 mRenderer = new RendererSevenShaderTest(latch); in OpenGLES20View()
116 mRenderer = new RendererEightShaderTest(latch); in OpenGLES20View()
118 mRenderer = new RendererNineShaderTest(latch); in OpenGLES20View()
[all …]
DNativeRendererOneColorBufferTest.java57 public NativeRendererOneColorBufferTest(Context context, CountDownLatch latch) { in NativeRendererOneColorBufferTest() argument
58 super(latch); in NativeRendererOneColorBufferTest()
61 public NativeRendererOneColorBufferTest(Context context, float[] color, CountDownLatch latch) { in NativeRendererOneColorBufferTest() argument
62 super(latch); in NativeRendererOneColorBufferTest()
/cts/tests/sensor/src/android/hardware/cts/helpers/
DTestSensorEventListener.java107 for (CountDownLatch latch : mEventLatches) { in onSensorChanged()
108 latch.countDown(); in onSensorChanged()
109 if (latch.getCount() == 0 && !mTestSensorEventListenerWakeLock.isHeld()) { in onSensorChanged()
130 CountDownLatch latch = new CountDownLatch(eventCount); in getLatchForSensorEvents() local
132 mEventLatches.add(latch); in getLatchForSensorEvents()
134 return latch; in getLatchForSensorEvents()
142 CountDownLatch latch = new CountDownLatch(1); in getLatchForFlushCompleteEvent() local
144 mFlushLatches.add(latch); in getLatchForFlushCompleteEvent()
146 return latch; in getLatchForFlushCompleteEvent()
160 for (CountDownLatch latch : mFlushLatches) { in onFlushCompleted()
[all …]
DSuspendStateMonitor.java44 CountDownLatch latch = new CountDownLatch(1); in waitForWakeUp() local
46 mWaitForWakeUpLatch.add(latch); in waitForWakeUp()
50 latch.await(); in waitForWakeUp()
53 boolean countZero = latch.await(numSeconds, TimeUnit.SECONDS); in waitForWakeUp()
70 for (CountDownLatch latch : mWaitForWakeUpLatch) { in run()
71 latch.countDown(); in run()
DTestSensorManager.java107 CountDownLatch latch = listener.getLatchForSensorEvents(eventCount); in registerListener() local
127 return latch; in registerListener()
170 CountDownLatch latch = mTestSensorEventListener.getLatchForFlushCompleteEvent(); in requestFlush() local
174 return latch; in requestFlush()
/cts/tests/tests/media/src/android/media/cts/
DMediaSession2ServiceTest.java120 final CountDownLatch latch = new CountDownLatch(1); in testOnGetSessionIsCalled() local
125 latch.countDown(); in testOnGetSessionIsCalled()
139 assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in testOnGetSessionIsCalled()
153 final CountDownLatch latch = new CountDownLatch(1); in testOnGetSession_returnsSession() local
163 latch.countDown(); in testOnGetSession_returnsSession()
189 assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in testOnGetSession_returnsSession()
241 final CountDownLatch latch = new CountDownLatch(1); in testOnGetSession_rejectsConnection() local
246 latch.countDown(); in testOnGetSession_rejectsConnection()
252 assertTrue(latch.await(TIMEOUT_MS, TimeUnit.MILLISECONDS)); in testOnGetSession_rejectsConnection()
258 final CountDownLatch latch = new CountDownLatch(1); in testAllControllersDisconnected_oneSession() local
[all …]
/cts/tests/app/src/android/app/cts/
DWallpaperManagerTest.java122 CountDownLatch latch = new CountDownLatch(1); in wallpaperChangedBroadcastTest() local
126 latch.countDown(); in wallpaperChangedBroadcastTest()
135 if (!latch.await(5, TimeUnit.SECONDS)) { in wallpaperChangedBroadcastTest()
147 CountDownLatch latch = new CountDownLatch(1); in wallpaperClearBroadcastTest() local
151 latch.countDown(); in wallpaperClearBroadcastTest()
160 if (!latch.await(5, TimeUnit.SECONDS)) { in wallpaperClearBroadcastTest()
204 final CountDownLatch latch = new CountDownLatch(1); in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded() local
205 WallpaperManager.OnColorsChangedListener counter = (colors, whichWp) -> latch.countDown(); in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded()
216 if (!latch.await(5, TimeUnit.SECONDS)) { in addRemoveOnColorsChangedListenerTest_onlyInvokeAdded()
338 final CountDownLatch latch = new CountDownLatch(expected); in verifyColorListenerInvoked() local
[all …]
DInstrumentation_ActivityMonitorTest.java153 final CountDownLatch latch = new CountDownLatch(1); in testActivityMonitor_onStartActivityBlocks() local
163 latch.countDown(); in testActivityMonitor_onStartActivityBlocks()
167 if (!latch.await(TIMEOUT_FOR_ACTIVITY_LAUNCH_MS, TimeUnit.MILLISECONDS)) { in testActivityMonitor_onStartActivityBlocks()
205 final CountDownLatch latch = new CountDownLatch(1); in testActivityMonitor_onStartActivityAndIntentFilter() local
215 latch.countDown(); in testActivityMonitor_onStartActivityAndIntentFilter()
219 if (!latch.await(TIMEOUT_FOR_ACTIVITY_LAUNCH_MS, TimeUnit.MILLISECONDS)) { in testActivityMonitor_onStartActivityAndIntentFilter()
257 final CountDownLatch latch = new CountDownLatch(1); in testActivityMonitor_onStartActivityAndActivityClass() local
267 latch.countDown(); in testActivityMonitor_onStartActivityAndActivityClass()
271 if (!latch.await(TIMEOUT_FOR_ACTIVITY_LAUNCH_MS, TimeUnit.MILLISECONDS)) { in testActivityMonitor_onStartActivityAndActivityClass()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DInstantAppsTests.java63 final CountDownLatch latch = new CountDownLatch(1); in elapsedRealtimeAlarm() local
65 () -> latch.countDown(), null); in elapsedRealtimeAlarm()
67 assertTrue("Alarm did not fire as expected", latch.await(500, TimeUnit.MILLISECONDS)); in elapsedRealtimeAlarm()
74 final CountDownLatch latch = new CountDownLatch(1); in rtcAlarm() local
75 mAlarmManager.setExact(AlarmManager.RTC, triggerRtc, TAG, () -> latch.countDown(), null); in rtcAlarm()
77 assertTrue("Alarm did not fire as expected", latch.await(500, TimeUnit.MILLISECONDS)); in rtcAlarm()
/cts/tests/app/app/src/android/app/stubs/
DOrientationTestUtils.java79 final CountDownLatch latch = new CountDownLatch(1); in startObserving() local
80 assertTrue(mLatch.compareAndSet(null, latch)); in startObserving()
100 final CountDownLatch latch = mLatch.get(); in onObserved() local
101 if (latch != null) { in onObserved()
102 latch.countDown(); in onObserved()
/cts/tests/tests/accounts/src/android/accounts/cts/
DAccountManagerTest.java519 final CountDownLatch latch = new CountDownLatch(1); in testAddAccountWithCallbackAndHandler() local
546 latch.countDown(); in testAddAccountWithCallbackAndHandler()
561 latch.await(LATCH_TIMEOUT_MS, TimeUnit.MILLISECONDS); in testAddAccountWithCallbackAndHandler()
1374 final CountDownLatch latch = new CountDownLatch(1); in testGetAuthTokenWithCallback_Options_Handler_DefaultToken_Success()
1390 latch.countDown(); in testGetAuthTokenWithCallback_Options_Handler_DefaultToken_Success()
1404 latch.await(LATCH_TIMEOUT_MS, TimeUnit.MILLISECONDS); in testGetAuthTokenWithCallback_Options_Handler_DefaultToken_Success()
1434 final CountDownLatch latch = new CountDownLatch(1); in testGetAuthTokenWithCallback_Options_Handler_CustomToken_Success()
1450 latch.countDown(); in testGetAuthTokenWithCallback_Options_Handler_CustomToken_Success()
1464 latch.await(LATCH_TIMEOUT_MS, TimeUnit.MILLISECONDS); in testGetAuthTokenWithCallback_Options_Handler_CustomToken_Success()
1495 final CountDownLatch latch = new CountDownLatch(1); in testGetAuthTokenWithCallbackAndHandler() local
[all …]
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/
DEventSanitizationTestActivity.java75 final CountDownLatch latch = new CountDownLatch(1); in testNoTriggerEventsWhileUidIdle() local
79 latch.countDown(); in testNoTriggerEventsWhileUidIdle()
91 latch.await(EVENT_TIMEOUT, TimeUnit.SECONDS)); in testNoTriggerEventsWhileUidIdle()
119 final CountDownLatch latch = new CountDownLatch(1); in testNoOnChangeEventsWhileUidIdle() local
123 latch.countDown(); in testNoOnChangeEventsWhileUidIdle()
141 latch.await(EVENT_TIMEOUT, TimeUnit.SECONDS)); in testNoOnChangeEventsWhileUidIdle()
/cts/tests/tests/voiceinteraction/src/android/voiceinteraction/cts/
DDirectActionsTest.java142 final CountDownLatch latch = new CountDownLatch(1); in startVoiceInteractionSession() local
146 latch.countDown(); in startVoiceInteractionSession()
160 if (!latch.await(OPERATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in startVoiceInteractionSession()
203 final CountDownLatch latch = new CountDownLatch(1); in executeCommand() local
209 latch.countDown(); in executeCommand()
227 if (!latch.await(OPERATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in executeCommand()
241 final CountDownLatch latch = new CountDownLatch(1); in startActivity() local
247 latch.countDown(); in startActivity()
266 if (!latch.await(OPERATION_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in startActivity()
296 final CountDownLatch latch = new CountDownLatch(1); in executeRemoteCommand() local
[all …]
/cts/hostsidetests/statsd/apps/statsdapp/src/com/android/server/cts/device/statsd/
DAtomTests.java168 CountDownLatch latch = new CountDownLatch(1); in testCameraState() local
178 latch.countDown(); in testCameraState()
197 waitForReceiver(context, 10_000, latch, null); in testCameraState()
239 CountDownLatch latch = new CountDownLatch(1); in testGpsScan() local
264 latch.countDown(); in testGpsScan()
269 waitForReceiver(context, 59_000, latch, null); in testGpsScan()
298 CountDownLatch latch = StatsdSyncAdapter.resetCountDownLatch(); in testSyncState() local
309 waitForReceiver(context, 120_000, latch, null); in testSyncState()
315 latch = StatsdSyncAdapter.resetCountDownLatch(); in testSyncState()
317 waitForReceiver(context, 120_000, latch, null); in testSyncState()
[all …]
DWakelockLoadTestRunnable.java27 CountDownLatch latch; field in WakelockLoadTestRunnable
30 latch = l; in WakelockLoadTestRunnable()
47 latch.countDown(); in run()
/cts/hostsidetests/devicepolicy/app/DeviceOwner/src/com/android/cts/deviceowner/
DSetTimeTest.java59 final CountDownLatch latch = new CountDownLatch(1); in testSetTimeWithValue() local
63 latch.countDown(); in testSetTimeWithValue()
71 latch.await(TIMEOUT_SEC, TimeUnit.SECONDS)); in testSetTimeWithValue()
91 final CountDownLatch latch = new CountDownLatch(1); in testSetTimeZoneWithValue() local
96 latch.countDown(); in testSetTimeZoneWithValue()
106 latch.await(TIMEOUT_SEC, TimeUnit.SECONDS)); in testSetTimeZoneWithValue()
/cts/tests/tests/appwidget/src/android/appwidget/cts/
DBlockingBroadcastReceiver.java34 private final CountDownLatch latch = new CountDownLatch(1); field in BlockingBroadcastReceiver
44 latch.countDown(); in onReceive()
48 latch.await(timeout, unit); in getParam()
53 assertTrue(latch.await(20, TimeUnit.SECONDS)); in await()
/cts/tests/autofillservice/src/android/autofillservice/cts/
DMultipleTimesTimeListener.java33 private final CountDownLatch latch; field in MultipleTimesTimeListener
44 this.latch = new CountDownLatch(times); in MultipleTimesTimeListener()
49 latch.countDown(); in onTimeChanged()
53 final boolean set = latch.await(FILL_TIMEOUT.ms(), TimeUnit.MILLISECONDS); in assertAutoFilled()
DOneTimeSpinnerListener.java36 private final CountDownLatch latch = new CountDownLatch(1); field in OneTimeSpinnerListener
47 final boolean set = latch.await(FILL_TIMEOUT.ms(), TimeUnit.MILLISECONDS); in assertAutoFilled()
57 latch.countDown(); in onItemSelected()
62 latch.countDown(); in onNothingSelected()
/cts/tests/tests/view/src/android/view/cts/
DViewAnimationMatrixTest.java108 final CountDownLatch latch = new CountDownLatch(1); in captureView() local
116 latch.countDown(); in captureView()
120 assertTrue(latch.await(1, TimeUnit.SECONDS)); in captureView()
125 final CountDownLatch latch = new CountDownLatch(1); in waitForDraw() local
127 view.getViewTreeObserver().registerFrameCommitCallback(latch::countDown); in waitForDraw()
130 assertTrue(latch.await(1, TimeUnit.SECONDS)); in waitForDraw()
/cts/tests/tests/content/src/android/content/cts/
DContentResolverSyncTestCase.java99 private CountDownLatch setNewLatch(CountDownLatch latch) { in setNewLatch() argument
101 getMockSyncAdapter().setLatch(latch); in setNewLatch()
102 return latch; in setNewLatch()
108 CountDownLatch latch = setNewLatch(new CountDownLatch(1)); in addAccountAndVerifyInitSync() local
114 if (!latch.await(INITIAL_SYNC_TIMEOUT_MS, TimeUnit.MILLISECONDS)) { in addAccountAndVerifyInitSync()
129 CountDownLatch latch = setNewLatch(new CountDownLatch(1)); in cancelSync() local
138 latch.await(latchTimeoutMillis, TimeUnit.MILLISECONDS); in cancelSync()
159 CountDownLatch latch = setNewLatch(new CountDownLatch(1)); in requestSync() local
168 latch.await(latchTimeoutMillis, TimeUnit.MILLISECONDS); in requestSync()
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DImsServiceConnector.java68 TestCarrierServiceConnection(CountDownLatch latch) { in TestCarrierServiceConnection() argument
69 mLatch = latch; in TestCarrierServiceConnection()
88 TestDeviceServiceConnection(CountDownLatch latch) { in TestDeviceServiceConnection() argument
89 mLatch = latch; in TestDeviceServiceConnection()
417 CountDownLatch latch = new CountDownLatch(1); in setupLocalCarrierImsService() local
418 mCarrierServiceConn = new TestCarrierServiceConnection(latch); in setupLocalCarrierImsService()
422 return latch.await(5000, TimeUnit.MILLISECONDS); in setupLocalCarrierImsService()
432 CountDownLatch latch = new CountDownLatch(1); in setupExternalImsService() local
433 mExternalServiceConn = new TestDeviceServiceConnection(latch); in setupExternalImsService()
440 return latch.await(5000, TimeUnit.MILLISECONDS); in setupExternalImsService()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/location/base/
DBaseGnssTestActivity.java147 for (CountDownLatch latch : mWaitForUserLatches) { in onClick()
148 latch.countDown(); in onClick()
247 CountDownLatch latch = new CountDownLatch(1); in waitForUser() local
249 mWaitForUserLatches.add(latch); in waitForUser()
253 latch.await(); in waitForUser()
285 ActivityResultMultiplexedLatch.Latch latch = mActivityResultMultiplexedLatch.bindThread(); in executeActivity() local
286 startActivityForResult(intent, latch.getRequestCode()); in executeActivity()
287 return latch.await(); in executeActivity()
/cts/tests/tests/contactsproviderwipe/src/android/provider/cts/contactsproviderwipe/
DContactsContract_Wipe.java179 final CountDownLatch latch = new CountDownLatch(1); in testDatabaseWipeNotification() local
189 latch.countDown(); in testDatabaseWipeNotification()
199 latch.await(120, TimeUnit.SECONDS)); in testDatabaseWipeNotification()
205 final CountDownLatch latch = new CountDownLatch(1); in testDatabaseWipeBroadcast() local
214 latch.countDown(); in testDatabaseWipeBroadcast()
224 latch.await(120, TimeUnit.SECONDS)); in testDatabaseWipeBroadcast()
/cts/tests/tests/voiceinteraction/service/src/android/voiceinteraction/service/
DDirectActionsSession.java137 final CountDownLatch latch = new CountDownLatch(1); in getDirectActions() local
143 latch.countDown(); in getDirectActions()
148 Utils.await(latch); in getDirectActions()
158 final CountDownLatch latch = new CountDownLatch(1); in performDirectAction() local
161 latch.countDown(); in performDirectAction()
163 Utils.await(latch); in performDirectAction()

1234567