Home
last modified time | relevance | path

Searched refs:PollingCheck (Results 1 – 25 of 241) sorted by relevance

12345678910

/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DPollingCheck.java26 public abstract class PollingCheck { class
38 public PollingCheck() { in PollingCheck() method in PollingCheck
42 public PollingCheck(long timeout) { in PollingCheck() method in PollingCheck
46 public PollingCheck(long timeout, String errorMessage) { in PollingCheck() method in PollingCheck
51 public PollingCheck(String errorMessage) { in PollingCheck() method in PollingCheck
123 new PollingCheck() { in waitFor() method
132 new PollingCheck(errorMessage) { in waitFor() method
141 new PollingCheck(timeout) { in waitFor() method
151 new PollingCheck(timeout) { in waitFor() method
165 new PollingCheck(timeout, errorMessage) { in waitFor() method
[all …]
DWindowUtil.java35 PollingCheck.waitFor(WINDOW_FOCUS_TIMEOUT_MILLIS, in waitForFocus()
44 PollingCheck.waitFor(WINDOW_FOCUS_TIMEOUT_MILLIS, in waitForFocus()
/cts/tests/app/src/android/app/cts/
DToolbarActionBarTest.kt24 import com.android.compatibility.common.util.PollingCheck in <lambda>()
63 PollingCheck.waitFor { activity.hasWindowFocus() } in setUp()
75 PollingCheck.waitFor { menuIsVisible.get() } in testOptionsMenuKey()
76 PollingCheck.waitFor { activity.getToolbar().isOverflowMenuShowing() } in testOptionsMenuKey()
83 PollingCheck.waitFor { !activity.getToolbar().hasWindowFocus() } in testOptionsMenuKey()
86 PollingCheck.waitFor { !menuIsVisible.get() } in testOptionsMenuKey()
87 PollingCheck.waitFor { !activity.getToolbar().isOverflowMenuShowing() } in testOptionsMenuKey()
100 PollingCheck.waitFor { menuIsVisible.get() } in testOpenOptionsMenu()
101 PollingCheck.waitFor { activity.getToolbar().isOverflowMenuShowing() } in testOpenOptionsMenu()
105 PollingCheck.waitFor { !menuIsVisible.get() } in testOpenOptionsMenu()
[all …]
DIntentServiceTest.java27 import com.android.compatibility.common.util.PollingCheck;
63 PollingCheck.check("onHandleIntentCalled not called enough", TIMEOUT_MSEC, in testIntents()
71 PollingCheck.check("accumulator not correct", TIMEOUT_MSEC, new Callable<Boolean>() { in testIntents()
78 PollingCheck.check("onDestroyCalled not called", TIMEOUT_MSEC, new Callable<Boolean>() { in testIntents()
89 new PollingCheck(TIMEOUT_MSEC) { in testIntentServiceLifeCycle() method
100 new PollingCheck(TIMEOUT_MSEC) { in testIntentServiceLifeCycle() method
DAlertDialogTest.java37 import com.android.compatibility.common.util.PollingCheck;
78 PollingCheck.waitFor(mActivity.getDialog()::isShowing); in startDialogActivity()
109 PollingCheck.waitFor(() -> mActivity.isPositiveButtonClicked); in doTestAlertDialog()
113 PollingCheck.waitFor(() -> mActivity.isNegativeButtonClicked); in doTestAlertDialog()
117 PollingCheck.waitFor(() -> mActivity.isNeutralButtonClicked); in doTestAlertDialog()
150 PollingCheck.waitFor(() -> in testAlertDialogAPIWithMessage()
155 PollingCheck.waitFor(() -> in testAlertDialogAPIWithMessage()
160 PollingCheck.waitFor(() -> in testAlertDialogAPIWithMessage()
213 PollingCheck.waitFor(() -> mActivity.onCancelCalled); in testAlertDialogCancelable()
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/
DDataSharingServiceTest.java29 import com.android.compatibility.common.util.PollingCheck;
79 PollingCheck.waitFor(() -> dataSharingService.mSessionFinished); in testDataSharingSessionAccepted()
80 PollingCheck.waitFor(() -> ccService.mDataShareSessionFinished); in testDataSharingSessionAccepted()
98 PollingCheck.waitFor(() -> dataSharingService.mSessionFinished); in testDataSharingSessionRejected()
99 PollingCheck.waitFor(() -> ccService.mDataShareSessionFinished); in testDataSharingSessionRejected()
113 PollingCheck.waitFor(() -> dataSharingService.mSessionFinished); in testDataShareRequest_valuesPropagatedToReceiver()
114 PollingCheck.waitFor(() -> ccService.mDataShareSessionFinished); in testDataShareRequest_valuesPropagatedToReceiver()
131 PollingCheck.waitFor(() -> dataSharingService.mSessionFinished); in testDataSharingSessionError_concurrentRequests()
132 PollingCheck.waitFor(() -> ccService.mDataShareSessionFinished); in testDataSharingSessionError_concurrentRequests()
148 PollingCheck.waitFor(() -> ccService.mDataShareSessionErrorCode > 0); in testDataSharingSessionError_senderWasKilledBeforeWrite()
[all …]
DDataSharingActivityTest.java28 import com.android.compatibility.common.util.PollingCheck;
62 PollingCheck.waitFor(() -> activity.mSessionFinished); in testHappyPath_dataCopiedSuccessfully()
63 PollingCheck.waitFor(() -> service.mDataShareSessionFinished); in testHappyPath_dataCopiedSuccessfully()
82 PollingCheck.waitFor(() -> activity.mSessionFinished); in testDataSharingSessionIsRejected_propagatedToClient()
83 PollingCheck.waitFor(() -> service.mDataShareSessionFinished); in testDataSharingSessionIsRejected_propagatedToClient()
/cts/tests/input/src/android/input/cts/
DModifierKeyRemappingTest.kt27 import com.android.compatibility.common.util.PollingCheck
74 PollingCheck.waitFor { activity.hasWindowFocus() } in setUp()
79 PollingCheck.waitFor { getModifierKeyRemapping().isEmpty() } in setUp()
104 PollingCheck.waitFor { inputManager.getInputDevice(keyboardDevice.deviceId) != null } in testModifierKeyRemapping()
118 PollingCheck.waitFor { getModifierKeyRemapping().size == numKeys } in testModifierKeyRemapping()
142 PollingCheck.waitFor { getModifierKeyRemapping().isEmpty() } in testModifierKeyRemapping()
165 PollingCheck.waitFor { inputManager.getInputDevice(keyboardDevice.deviceId) != null } in testHardwareKeyEventsWithRemapping_AfterKeyboardAdded()
169 PollingCheck.waitFor { getModifierKeyRemapping().size == 1 } in testHardwareKeyEventsWithRemapping_AfterKeyboardAdded()
179 PollingCheck.waitFor { getModifierKeyRemapping().isEmpty() } in testHardwareKeyEventsWithRemapping_AfterKeyboardAdded()
196 PollingCheck.waitFor { getModifierKeyRemapping().size == 1 } in testHardwareKeyEventsWithRemapping_BeforeKeyboardAdded()
[all …]
DIncompleteMotionTest.kt36 import com.android.compatibility.common.util.PollingCheck
94 PollingCheck.waitFor { activity.hasWindowFocus() } in setUp()
134 PollingCheck.waitFor { receiver.overlayActivityIsFocused() } in testIncompleteMotion()
155 PollingCheck.waitFor( in testIncompleteMotion()
165 PollingCheck.waitFor { activity.receivedMove() } in testIncompleteMotion()
/cts/tests/tests/webkit/src/android/webkit/cts/
DGeolocationTest.java42 import com.android.compatibility.common.util.PollingCheck;
355 PollingCheck.check("Geolocation prompt not called", POLLING_TIMEOUT, receivedRequest); in testSimpleGeolocationRequestAcceptOnce()
362 PollingCheck.check("JS didn't get position", POLLING_TIMEOUT, receivedLocation); in testSimpleGeolocationRequestAcceptOnce()
366 PollingCheck.check("Geolocation prompt not called", POLLING_TIMEOUT, receivedRequest); in testSimpleGeolocationRequestAcceptOnce()
367 PollingCheck.check("JS didn't get position", POLLING_TIMEOUT, receivedLocation); in testSimpleGeolocationRequestAcceptOnce()
370 private static class OriginCheck extends PollingCheck implements
410 private static class BooleanCheck extends PollingCheck implements
447 PollingCheck.check("Geolocation prompt not called", POLLING_TIMEOUT, receivedRequest); in testSimpleGeolocationRequestAcceptAlways()
454 PollingCheck.check("JS didn't get position", POLLING_TIMEOUT, receivedLocation); in testSimpleGeolocationRequestAcceptAlways()
459 PollingCheck.check("JS didn't get position", POLLING_TIMEOUT, receivedLocation); in testSimpleGeolocationRequestAcceptAlways()
[all …]
/cts/tests/tests/car/src/android/car/app/cts/
DCarTaskViewControllerTest.java58 import com.android.compatibility.common.util.PollingCheck;
120 PollingCheck.waitFor(() -> mCallback.mCarTaskViewController != null, in setUp()
215 PollingCheck.waitFor(() -> taskViewCallback.mTaskViewReleased, "TaskView not released"); in multipleControlledCarTaskView_released_whenHostDestroyed()
220 PollingCheck.waitFor(() -> taskViewCallback2.mTaskViewReleased, "TaskView not released"); in multipleControlledCarTaskView_released_whenHostDestroyed()
241 PollingCheck.waitFor(() -> taskViewCallback2.mTaskViewReleased, "TaskView not released"); in releaseControlledCarTaskView_releasesTaskView()
265 PollingCheck.waitFor(() -> EmbeddedTestActivity1.sInstance != null, in controlledRemoteCarTaskView_autoRestartDisabled_doesNotRestartTask_whenKilled()
272 PollingCheck.waitFor(() -> taskViewHolder.mCurrentTask == null, in controlledRemoteCarTaskView_autoRestartDisabled_doesNotRestartTask_whenKilled()
291 PollingCheck.waitFor(() -> EmbeddedTestActivity1.sInstance != null, in controlledRemoteCarTaskView_autoRestartEnabled_restartsTheTask_whenKilled()
296 PollingCheck.waitFor(() -> taskViewHolder.mNumTimesOnTaskVanished == 1, in controlledRemoteCarTaskView_autoRestartEnabled_restartsTheTask_whenKilled()
300 PollingCheck.waitFor(() -> taskViewHolder.mCurrentTask != null, in controlledRemoteCarTaskView_autoRestartEnabled_restartsTheTask_whenKilled()
[all …]
/cts/tests/tests/tv/src/android/media/tv/cts/
DTvInputServiceTest.java62 import com.android.compatibility.common.util.PollingCheck;
402 PollingCheck.waitFor(TIME_OUT, () -> session.mReleaseCount > 0); in verifyCommandRelease()
413 PollingCheck.waitFor(TIME_OUT, () -> session.mStartRecordingCount > 0); in verifyCommandStartRecording()
425 PollingCheck.waitFor(TIME_OUT, () -> session.mStartRecordingWithBundleCount > 0); in verifyCommandStartRecordingWithBundle()
441 PollingCheck.waitFor(TIME_OUT, () -> session.mPauseRecordingWithBundleCount > 0); in verifyCommandPauseResumeRecordingWithBundle()
446 PollingCheck.waitFor(TIME_OUT, () -> session.mResumeRecordingWithBundleCount > 0); in verifyCommandPauseResumeRecordingWithBundle()
460 PollingCheck.waitFor(TIME_OUT, () -> session.mPauseRecordingWithBundleCount > 0); in verifyCommandPauseResumeRecording()
465 PollingCheck.waitFor(TIME_OUT, () -> session.mResumeRecordingWithBundleCount > 0); in verifyCommandPauseResumeRecording()
478 PollingCheck.waitFor(TIME_OUT, () -> session.mStopRecordingCount > 0); in verifyCommandStopRecording()
490 PollingCheck.waitFor(TIME_OUT, () -> session.mAppPrivateCommandCount > 0); in verifyCommandSendAppPrivateCommandForRecording()
[all …]
/cts/tests/tests/tv/src/android/media/tv/ad/cts/
DTvAdServiceTest.java59 import com.android.compatibility.common.util.PollingCheck;
181 PollingCheck.waitFor(TIME_OUT_MS, () -> mTvAdView.getAdSession() != null); in setUp()
223 new PollingCheck(TIME_OUT_MS) { in testGetOnUnhandledInputEventListener() method
238 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mCurrentTvInputIdCount > 0); in testSendCurrentTvInputId()
249 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mCurrentVideoBoundsCount > 0); in testSendCurrentVideoBounds()
260 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mCurrentChannelUriCount > 0); in testSendCurrentChannelUri()
272 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mSigningResultCount > 0); in testSendSigningResult()
291 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mTrackInfoListCount > 0); in testSendTrackInfoList()
329 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mTvMessageCount > 0); in testNotifyTvMessage()
340 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mResetAdServiceCount > 0); in testResetAdService()
[all …]
/cts/tests/tests/tv/src/android/media/tv/interactive/cts/
DTvInteractiveAppServiceTest.java85 import com.android.compatibility.common.util.PollingCheck;
505 PollingCheck.waitFor(TIME_OUT_MS, () -> mTvView.getInputSession() != null); in linkTvView()
520 PollingCheck.waitFor(TIME_OUT_MS, () -> StubTvInputService2.sStubRecordingSession != null); in linkTvRecordingClient()
631 PollingCheck.waitFor(TIME_OUT_MS, () -> mTvIAppView.getInteractiveAppSession() != null); in setUp()
667 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mRecordingTunedCount > 0); in testNotifyRecordingTuned()
682 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mRecordingConnectionFailedCount > 0); in testRecordingConnectionFailed()
692 PollingCheck.waitFor(TIME_OUT_MS, () -> mSession.mRecordingDisconnected > 0); in testRecordingDisconnected()
702 PollingCheck.waitFor(LONGER_TIME_OUT_MS, () -> mSession.mRecordingErrorCount > 0); in testRecordingError()
714 PollingCheck.waitFor(TIME_OUT_MS, () -> mCallback.mRequestCurrentChannelUriCount > 0); in testRequestCurrentChannelUri()
724 PollingCheck.waitFor(TIME_OUT_MS, () -> mCallback.mRequestCurrentVideoBoundsCount > 0); in testRequestCurrentVideoBounds()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/insets/
DWindowInsetsControllerTests.java95 import com.android.compatibility.common.util.PollingCheck;
153 PollingCheck.waitFor(TIMEOUT, () -> !rootView.getRootWindowInsets().isVisible(types)); in testHideInternal()
173 PollingCheck.waitFor(TIMEOUT, () -> !rootView.getRootWindowInsets().isVisible(types)); in testShowInternal()
177 PollingCheck.waitFor(TIMEOUT, () -> rootView.getRootWindowInsets().isVisible(types)); in testShowInternal()
187 PollingCheck.waitFor(TIMEOUT, in testTopAppHidesStatusBarInternal()
251 PollingCheck.waitFor(TIMEOUT_COLD_START_IME, in testImeShowAndHide()
254 PollingCheck.waitFor(TIMEOUT, () -> !rootView.getRootWindowInsets().isVisible(ime())); in testImeShowAndHide()
278 PollingCheck.check("Nav bar must be invisible.", TIMEOUT, in testImeForceShowingNavigationBar()
299 PollingCheck.check("IME and nav bar must be both visible.", in testImeForceShowingNavigationBar()
306 PollingCheck.check("IME and nav bar must be both invisible.", in testImeForceShowingNavigationBar()
[all …]
DWindowInsetsLayoutTests.java42 import com.android.compatibility.common.util.PollingCheck;
67 PollingCheck.waitFor(TIMEOUT, () -> mainWindowRoot.getWidth() > 0); in testSetFitInsetsTypes()
85 PollingCheck.waitFor(TIMEOUT, () -> overlayWindowRoot.getWidth() > 0); in testSetFitInsetsTypesInner()
103 PollingCheck.waitFor(TIMEOUT, () -> mainWindowRoot.getWidth() > 0); in testSetFitInsetsSides()
123 PollingCheck.waitFor(TIMEOUT, () -> overlayWindowRoot.getWidth() > 0); in testSetFitInsetsSidesInner()
152 PollingCheck.waitFor(TIMEOUT, () -> mainWindowRoot.getWidth() > 0); in testSetFitInsetsIgnoringVisibility()
166 PollingCheck.waitFor(TIMEOUT, () -> overlayWindowRoot1.getWidth() > 0); in testSetFitInsetsIgnoringVisibility()
181 PollingCheck.waitFor(TIMEOUT, () -> overlayWindowRoot2.getWidth() > 0); in testSetFitInsetsIgnoringVisibility()
/cts/tests/AlarmManager/src/android/alarmmanager/cts/
DBasicApiTests.java50 import com.android.compatibility.common.util.PollingCheck;
151 new PollingCheck(SNOOZE_DELAY + TIME_DELAY) { in testSetTypes()
163 new PollingCheck(SNOOZE_DELAY + TIME_DELAY) { in testSetTypes()
180 new PollingCheck(TIME_DELAY) { in testAlarmTriggersImmediatelyIfSetTimeIsNegative() method
221 PollingCheck.waitFor(1000, mMockAlarmReceiver::isAlarmed, in testExactAlarmBatching()
227 PollingCheck.waitFor(1000, mMockAlarmReceiver2::isAlarmed, in testExactAlarmBatching()
256 PollingCheck.waitFor(2000, mMockAlarmReceiver::isAlarmed, in testSetExactWithWorkSource()
268 PollingCheck.waitFor(2000, mMockAlarmReceiver::isAlarmed, in testSetExact()
282 PollingCheck.waitFor(4000, mMockAlarmReceiver::isAlarmed, in testSetWindow()
294 new PollingCheck(TEST_ALARM_FUTURITY + REPEAT_PERIOD) { in testSetRepeating()
[all …]
/cts/tests/tests/view/src/android/view/animation/cts/
DAnimationTestUtils.java28 import com.android.compatibility.common.util.PollingCheck;
77 PollingCheck.waitFor(animation::hasStarted); in assertRunAnimation()
80 PollingCheck.waitFor(duration + TIMEOUT_DELTA, animation::hasEnded); in assertRunAnimation()
/cts/tests/tests/transition/src/android/transition/cts/
DChangeClipBoundsTest.java30 import com.android.compatibility.common.util.PollingCheck;
64 PollingCheck.waitFor(isMiddleOfClipping(redSquare, newClip)); in testChangeClipBounds()
79 PollingCheck.waitFor(isMiddleOfClipping(redSquare, newClip)); in testChangeClipBounds()
85 private static PollingCheck.PollingCheckCondition isMiddleOfClipping(final View redSquare, in isMiddleOfClipping()
/cts/tests/tests/simphonebookprovider/src/android/provider/cts/simphonebook/
DSimPhonebookContract_ContentNotificationsTest.java43 import com.android.compatibility.common.util.PollingCheck;
109 PollingCheck.check( in insert_notifiesObserver()
120 PollingCheck.check( in update_notifiesObserver()
127 PollingCheck.check( in update_notifiesObserver()
138 PollingCheck.check( in delete_notifiesObserver()
144 PollingCheck.check( in delete_notifiesObserver()
/cts/tests/tests/media/misc/src/android/media/misc/cts/
DMediaScannerConnectionTest.java29 import com.android.compatibility.common.util.PollingCheck;
98 new PollingCheck(TIME_OUT) { in checkMediaScannerConnection() method
103 new PollingCheck(TIME_OUT) { in checkMediaScannerConnection() method
111 new PollingCheck(TIME_OUT) { in checkConnectionState() method
/cts/hostsidetests/os/src/android/os/cts/
DInattentiveSleepTests.java27 import com.android.compatibility.common.util.PollingCheck;
188 PollingCheck.check("Expected device to be asleep after timeout", TIME_BEFORE_WARNING_MS, in testInattentiveSleep_goesToSleepAfterTimeout()
200 PollingCheck.check("Expected device to be asleep after timeout", 1000, in testInattentiveSleep_goesToSleepAfterTimeoutWithWakeLock()
252 PollingCheck.check(message, TIME_BEFORE_WARNING_MS + 500, in assertWarningShown()
261 PollingCheck.waitFor(TIME_BEFORE_WARNING_MS + mWarningDurationConfig + 2000, in waitUntilAsleep()
270 PollingCheck.waitFor(timeout, this::isWarningShown); in waitUntilWarningIsShowing()
274 PollingCheck.waitFor(timeout, () -> !isWarningShown()); in waitUntilWarningIsNotShowing()
/cts/tests/tests/widget/src/android/widget/cts/
DFilterTest.java38 import com.android.compatibility.common.util.PollingCheck;
100 PollingCheck.waitFor(TIME_OUT, mMockFilter::hadPerformedFiltering); in testFilter1()
103 PollingCheck.waitFor(TIME_OUT, mMockFilter::hadPublishedResults); in testFilter1()
119 PollingCheck.waitFor(TIME_OUT, mMockFilter::hadPerformedFiltering); in testFilter2()
122 PollingCheck.waitFor(TIME_OUT, mMockFilter::hadPublishedResults); in testFilter2()
DSlidingDrawerTest.java49 import com.android.compatibility.common.util.PollingCheck;
152 PollingCheck.waitFor(() -> !mDrawer.isMoving()); in testAnimateOpenAndClose()
153 PollingCheck.waitFor(mDrawer::isOpened); in testAnimateOpenAndClose()
160 PollingCheck.waitFor(() -> !mDrawer.isMoving()); in testAnimateOpenAndClose()
161 PollingCheck.waitFor(() -> !mDrawer.isOpened()); in testAnimateOpenAndClose()
176 PollingCheck.waitFor(() -> !mDrawer.isMoving()); in testAnimateToggle()
177 PollingCheck.waitFor(mDrawer::isOpened); in testAnimateToggle()
184 PollingCheck.waitFor(() -> !mDrawer.isMoving()); in testAnimateToggle()
185 PollingCheck.waitFor(() -> !mDrawer.isOpened()); in testAnimateToggle()
/cts/tests/tests/media/bettertogether/src/android/media/bettertogether/cts/
DMediaBrowserTest.java35 import com.android.compatibility.common.util.PollingCheck;
129 runOnMainThread(() -> new PollingCheck(TIME_OUT_MS) { in testMediaBrowser()
176 new PollingCheck(TIME_OUT_MS) { in testConnectionFailed() method
202 new PollingCheck(TIME_OUT_MS) { in testReconnection() method
213 new PollingCheck(TIME_OUT_MS) { in testReconnection() method
229 new PollingCheck(TIME_OUT_MS) { in testReconnection() method
266 new PollingCheck(TIME_OUT_MS) { in testSubscribe() method
341 new PollingCheck(TIME_OUT_MS) { in testSubscribeWithOptions() method
394 new PollingCheck(TIME_OUT_MS) { in testSubscribeInvalidItem() method
418 new PollingCheck(TIME_OUT_MS) { in testSubscribeInvalidItemWithOptions() method
[all …]

12345678910