Home
last modified time | relevance | path

Searched refs:now (Results 1 – 25 of 44) sorted by relevance

12

/cts/tests/app/app/src/android/app/stubs/
DMockService.java89 long now = SystemClock.elapsedRealtime(); in waitForStart() local
90 final long endTime = now + timeout; in waitForStart()
92 while (!sStarted && now < endTime) { in waitForStart()
94 sBlocker.wait(endTime - now); in waitForStart()
97 now = SystemClock.elapsedRealtime(); in waitForStart()
111 long now = SystemClock.elapsedRealtime(); in waitForDestroy() local
112 final long endTime = now + timeout; in waitForDestroy()
114 while (!sDestroyed && now < endTime) { in waitForDestroy()
116 sBlocker.wait(endTime - now); in waitForDestroy()
119 now = SystemClock.elapsedRealtime(); in waitForDestroy()
DPendingIntentStubActivity.java51 long now = SystemClock.elapsedRealtime(); in waitForCreate() local
52 final long endTime = now + timeout; in waitForCreate()
54 while (!sCreated && now < endTime) { in waitForCreate()
56 sBlocker.wait(endTime - now); in waitForCreate()
59 now = SystemClock.elapsedRealtime(); in waitForCreate()
DMockReceiver.java58 long now = SystemClock.elapsedRealtime(); in waitForReceive() local
59 final long endTime = now + timeout; in waitForReceive()
61 while (!sReceived && now < endTime) { in waitForReceive()
63 sBlocker.wait(endTime - now); in waitForReceive()
66 now = SystemClock.elapsedRealtime(); in waitForReceive()
/cts/tests/tests/text/src/android/text/method/cts/
DScrollingMovementMethodTest.java123 final long now = SystemClock.uptimeMillis(); in testOnTouchEventHorizontalMotion() local
128 MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 0, 0, 0)); in testOnTouchEventHorizontalMotion()
138 MotionEvent.obtain(now, now, MotionEvent.ACTION_MOVE, tinyDist, 0, 0)); in testOnTouchEventHorizontalMotion()
147 MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, tinyDist, 0, 0)); in testOnTouchEventHorizontalMotion()
155 MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 0, 0, 0)); in testOnTouchEventHorizontalMotion()
165 MotionEvent.obtain(now, now, MotionEvent.ACTION_MOVE, distFar, 0, 0)); in testOnTouchEventHorizontalMotion()
177 MotionEvent.obtain(now, now, MotionEvent.ACTION_MOVE, distTooFar, 0, 0)); in testOnTouchEventHorizontalMotion()
188 MotionEvent.obtain(now, now, MotionEvent.ACTION_MOVE, 0, 0, 0)); in testOnTouchEventHorizontalMotion()
198 MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, 0, 0, 0)); in testOnTouchEventHorizontalMotion()
217 final long now = SystemClock.uptimeMillis(); local
[all …]
DLinkMovementMethodTest.java214 long now = SystemClock.uptimeMillis(); in testOnKeyDown() local
215 KeyEvent event = new KeyEvent(now, now, KeyEvent.ACTION_DOWN, in testOnKeyDown()
296 long now = SystemClock.uptimeMillis(); in testOnTouchEvent_nullViewParam() local
299 MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 5, y, 0)); in testOnTouchEvent_nullViewParam()
305 long now = SystemClock.uptimeMillis(); in testOnTouchEvent_nullSpannableParam() local
308 MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 5, y, 0)); in testOnTouchEvent_nullSpannableParam()
490 long now = SystemClock.uptimeMillis(); in performMotionOnLine() local
493 MotionEvent.obtain(now, now, action, x, y, 0)); in performMotionOnLine()
DArrowKeyMovementMethodTest.java902 long now = SystemClock.currentThreadTimeMillis(); in testOnTouchEvent() local
905 MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, 1, 1, 0))); in testOnTouchEvent()
909 MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, 1, 1, in testOnTouchEvent()
922 long now = SystemClock.currentThreadTimeMillis(); in testOnTouchEventWithNullLayout() local
924 MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, 1, 1, 0))); in testOnTouchEventWithNullLayout()
930 long now = SystemClock.currentThreadTimeMillis(); in testOnTouchEventWithoutFocus() local
933 MotionEvent.obtain(now, now, MotionEvent.ACTION_UP, 1, 1, 0))); in testOnTouchEventWithoutFocus()
1457 final long now = System.currentTimeMillis(); in pressCtrlChord() local
1459 now, now, KeyEvent.ACTION_DOWN, keyCode, 0, KeyEvent.META_CTRL_LEFT_ON); in pressCtrlChord()
/cts/tests/app/src/android/app/cts/android/app/cts/tools/
DServiceConnectionHandler.java72 final long now = SystemClock.uptimeMillis(); in waitForConnect() local
73 if (now >= endTime) { in waitForConnect()
77 wait(endTime - now); in waitForConnect()
93 final long now = SystemClock.uptimeMillis(); in waitForDisconnect() local
94 if (now >= endTime) { in waitForDisconnect()
98 wait(endTime - now); in waitForDisconnect()
DUidImportanceListener.java51 final long now = SystemClock.uptimeMillis(); in waitForValue() local
52 if (now >= endTime) { in waitForValue()
57 wait(endTime-now); in waitForValue()
DSyncOrderedBroadcast.java57 final long now = SystemClock.uptimeMillis(); in sendAndWait() local
58 if (now >= endTime) { in sendAndWait()
62 wait(endTime - now); in sendAndWait()
DWaitForBroadcast.java64 final long now = SystemClock.uptimeMillis(); in doWait() local
65 if (now >= endTime) { in doWait()
71 wait(endTime - now); in doWait()
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DContactsContract_RawContactsTest.java236 final long now = System.currentTimeMillis(); in testInsertUsageStat() local
242 .with(RawContacts.LAST_TIME_CONTACTED, now) in testInsertUsageStat()
247 assertEquals(now / 86400 * 86400, rawContact.getLong(RawContacts.LAST_TIME_CONTACTED)); in testInsertUsageStat()
265 .with(RawContacts.LAST_TIME_CONTACTED, now) in testInsertUsageStat()
270 assertEquals(now / 86400 * 86400, rawContact.getLong(RawContacts.LAST_TIME_CONTACTED)); in testInsertUsageStat()
277 final long now = System.currentTimeMillis(); in testUpdateUsageStat() local
282 .with(RawContacts.LAST_TIME_CONTACTED, now) in testUpdateUsageStat()
287 assertEquals(now / 86400 * 86400, rawContact.getLong(RawContacts.LAST_TIME_CONTACTED)); in testUpdateUsageStat()
295 assertEquals(now / 86400 * 86400, rawContact.getLong(RawContacts.LAST_TIME_CONTACTED)); in testUpdateUsageStat()
298 values.put(RawContacts.LAST_TIME_CONTACTED, now + 86400); in testUpdateUsageStat()
[all …]
DContactsContract_ContactsTest.java212 final long now = System.currentTimeMillis(); in testContactUpdate_usageStats() local
217 values.put(Contacts.LAST_TIME_CONTACTED, now); in testContactUpdate_usageStats()
222 assertEquals(now / 86400 * 86400, contact.getLong(Contacts.LAST_TIME_CONTACTED)); in testContactUpdate_usageStats()
226 values.put(Contacts.LAST_TIME_CONTACTED, now); in testContactUpdate_usageStats()
231 assertEquals(now / 86400 * 86400, contact.getLong(Contacts.LAST_TIME_CONTACTED)); in testContactUpdate_usageStats()
240 assertEquals(now / 86400 * 86400, contact.getLong(Contacts.LAST_TIME_CONTACTED)); in testContactUpdate_usageStats()
254 final long now = (System.currentTimeMillis() / 86400 * 86400) + 86400 * 5 + 123; in testContactUpdateDelete_usageStats_visibilityInWhere() local
257 values.put(Contacts.LAST_TIME_CONTACTED, now); in testContactUpdateDelete_usageStats_visibilityInWhere()
267 assertEquals(now / 86400 * 86400, contact.getLong(Contacts.LAST_TIME_CONTACTED)); in testContactUpdateDelete_usageStats_visibilityInWhere()
270 assertEquals(now / 86400 * 86400, rawContact.getLong(Contacts.LAST_TIME_CONTACTED)); in testContactUpdateDelete_usageStats_visibilityInWhere()
[all …]
/cts/tests/tests/view/jni/
Dandroid_view_cts_ChoreographerNativeTest.cpp57 static std::chrono::nanoseconds now() { in now() function
58 return std::chrono::steady_clock::now().time_since_epoch(); in now()
93 auto start = now(); in android_view_cts_ChoreographerNativeTest_testPostCallbackWithoutDelayEventuallyRunsCallback()
112 start = now(); in android_view_cts_ChoreographerNativeTest_testPostCallbackWithoutDelayEventuallyRunsCallback()
127 auto start = now(); in android_view_cts_ChoreographerNativeTest_testPostCallbackWithDelayEventuallyRunsCallback()
/cts/tests/tests/os/src/android/os/cts/
DMessageQueueTest.java177 long now = SystemClock.uptimeMillis() + 200; in testMessageOrder()
180 mHandler.sendMessageAtTime(mHandler.obtainMessage(2), now + 1); in testMessageOrder()
181 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now + 2); in testMessageOrder()
182 mHandler.sendMessageAtTime(mHandler.obtainMessage(4), now + 2); in testMessageOrder()
183 mHandler.sendMessageAtTime(mHandler.obtainMessage(0), now + 0); in testMessageOrder()
184 mHandler.sendMessageAtTime(mHandler.obtainMessage(1), now + 0); in testMessageOrder()
201 long now = SystemClock.uptimeMillis() + 200; in testAtFrontOfQueue()
203 mHandler.sendMessageAtTime(mHandler.obtainMessage(3), now); in testAtFrontOfQueue()
864 long now = System.currentTimeMillis(); in doTest() local
865 long endTime = now + timeout; in doTest()
[all …]
DMessengerTest.java263 long now = System.currentTimeMillis(); in doTest() local
264 long endTime = now + timeout; in doTest()
266 while (!mDone && now < endTime) { in doTest()
268 now = System.currentTimeMillis(); in doTest()
/cts/tests/tests/text/src/android/text/format/cts/
DDateUtilsTest.java303 long now = System.currentTimeMillis(); in test_bug_7548161() local
304 long today = now; in test_bug_7548161()
305 long tomorrow = now + DateUtils.DAY_IN_MILLIS; in test_bug_7548161()
306 long yesterday = now - DateUtils.DAY_IN_MILLIS; in test_bug_7548161()
307 assertEquals("Tomorrow", DateUtils.getRelativeTimeSpanString(tomorrow, now, in test_bug_7548161()
309 assertEquals("Yesterday", DateUtils.getRelativeTimeSpanString(yesterday, now, in test_bug_7548161()
311 assertEquals("Today", DateUtils.getRelativeTimeSpanString(today, now, in test_bug_7548161()
/cts/hostsidetests/shortcuts/deviceside/multiuser/src/android/content/pm/cts/shortcut/multiuser/
DShortcutManagerSecondaryUserTest.java66 final long now = System.currentTimeMillis(); in testCreateAndStart() local
71 retryUntil(() -> MainActivity.getLastCreateTime() >= now, "Activity not started"); in testCreateAndStart()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DAppSecurityTests.java350 long now = System.currentTimeMillis(); in getOutput() local
351 while (now < end) { in getOutput()
353 threadLock.wait(end - now); in getOutput()
355 now = System.currentTimeMillis(); in getOutput()
/cts/tests/tests/view/src/android/view/cts/
DFrameMetricsListenerTest.java192 long now = System.nanoTime(); in callGetMetric() local
195 assertTrue(intended_vsync < now); in callGetMetric()
196 assertTrue(vsync < now); in callGetMetric()
/cts/tests/app/src/android/app/cts/
DInstrumentationTest.java206 long now = SystemClock.uptimeMillis(); in testSendTrackballEventSync() local
207 MotionEvent orig = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, in testSendTrackballEventSync()
354 long now = SystemClock.uptimeMillis(); in testSendPointerSync() local
355 MotionEvent orig = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, in testSendPointerSync()
DAlarmManagerTest.java188 final long now = System.currentTimeMillis(); in testExactAlarmBatching() local
189 final long windowStart = now + TEST_ALARM_FUTURITY; in testExactAlarmBatching()
199 new PollingCheck(TEST_WINDOW_LENGTH + (windowStart - now) + 500) { in testExactAlarmBatching()
DPendingIntentTest.java119 long now = SystemClock.elapsedRealtime(); in waitForFinish() local
120 final long endTime = now + timeout; in waitForFinish()
122 while (!mFinishResult && now < endTime) { in waitForFinish()
124 mFinish.wait(endTime - now); in waitForFinish()
127 now = SystemClock.elapsedRealtime(); in waitForFinish()
/cts/tests/tests/keystore/src/android/keystore/cts/
DKeyAttestationTest.java187 Date now = new Date(); in testEcAttestation_NoChallenge() local
188 Date originationEnd = new Date(now.getTime() + ORIGINATION_TIME_OFFSET); in testEcAttestation_NoChallenge()
189 Date consumptionEnd = new Date(now.getTime() + CONSUMPTION_TIME_OFFSET); in testEcAttestation_NoChallenge()
194 .setKeyValidityStart(now) in testEcAttestation_NoChallenge()
305 Date now = new Date(); in testRsaAttestation_NoChallenge() local
306 Date originationEnd = new Date(now.getTime() + ORIGINATION_TIME_OFFSET); in testRsaAttestation_NoChallenge()
307 Date consumptionEnd = new Date(now.getTime() + CONSUMPTION_TIME_OFFSET); in testRsaAttestation_NoChallenge()
311 .setKeyValidityStart(now) in testRsaAttestation_NoChallenge()
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvInputServiceTest.java600 final long now = SystemClock.uptimeMillis(); in verifyCommandDispatchTouchEvent() local
601 final MotionEvent event = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 1.0f, 1.0f, in verifyCommandDispatchTouchEvent()
620 final long now = SystemClock.uptimeMillis(); in verifyCommandDispatchTrackballEvent() local
621 final MotionEvent event = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 1.0f, 1.0f, in verifyCommandDispatchTrackballEvent()
640 final long now = SystemClock.uptimeMillis(); in verifyCommandDispatchGenericMotionEvent() local
641 final MotionEvent event = MotionEvent.obtain(now, now, MotionEvent.ACTION_DOWN, 1.0f, 1.0f, in verifyCommandDispatchGenericMotionEvent()
/cts/apps/CtsVerifier/src/com/android/cts/verifier/usb/device/
DUsbDeviceTestActivity.java94 private static long now() { in now() method in UsbDeviceTestActivity
427 long startTime = now(); in receiveWithEmptyBuffer()
434 long endTime = now(); in receiveWithEmptyBuffer()
846 long startTime = now(); in timeoutWhileWaitingForUsbRequest()
848 assertTrue(now() - startTime >= 100); in timeoutWhileWaitingForUsbRequest()
849 assertTrue(now() - startTime < 400); in timeoutWhileWaitingForUsbRequest()
851 startTime = now(); in timeoutWhileWaitingForUsbRequest()
853 assertTrue(now() - startTime < 400); in timeoutWhileWaitingForUsbRequest()
873 long startTime = now();
875 assertTrue(now() - startTime < timeout + 50);
[all …]

12