/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | PollingCheck.java | 26 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 …]
|
D | WindowUtil.java | 35 PollingCheck.waitFor(WINDOW_FOCUS_TIMEOUT_MILLIS, in waitForFocus() 44 PollingCheck.waitFor(WINDOW_FOCUS_TIMEOUT_MILLIS, in waitForFocus()
|
/cts/tests/app/src/android/app/cts/ |
D | ToolbarActionBarTest.kt | 24 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 …]
|
D | IntentServiceTest.java | 27 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
|
D | AlertDialogTest.java | 37 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/ |
D | DataSharingServiceTest.java | 29 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 …]
|
D | DataSharingActivityTest.java | 28 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/ |
D | ModifierKeyRemappingTest.kt | 27 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 …]
|
D | IncompleteMotionTest.kt | 36 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/ |
D | GeolocationTest.java | 42 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/ |
D | CarTaskViewControllerTest.java | 58 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/ |
D | TvInputServiceTest.java | 62 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/ |
D | TvAdServiceTest.java | 59 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/ |
D | TvInteractiveAppServiceTest.java | 85 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/ |
D | WindowInsetsControllerTests.java | 95 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 …]
|
D | WindowInsetsLayoutTests.java | 42 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/ |
D | BasicApiTests.java | 50 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/ |
D | AnimationTestUtils.java | 28 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/ |
D | ChangeClipBoundsTest.java | 30 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/ |
D | SimPhonebookContract_ContentNotificationsTest.java | 43 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/ |
D | MediaScannerConnectionTest.java | 29 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/ |
D | InattentiveSleepTests.java | 27 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/ |
D | FilterTest.java | 38 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()
|
D | SlidingDrawerTest.java | 49 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/ |
D | MediaBrowserTest.java | 35 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 …]
|