Home
last modified time | relevance | path

Searched refs:condition (Results 1 – 25 of 69) sorted by relevance

123

/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DCondition.java165 public static <T> boolean waitFor(Condition<T> condition) { in waitFor() argument
166 if (condition.mSatisfier == null) { in waitFor()
167 condition.prepareSatisfier(); in waitFor()
171 for (int i = 1; i <= condition.mRetryLimit; i++) { in waitFor()
172 if (condition.mSatisfier.getAsBoolean()) { in waitFor()
175 SystemClock.sleep(condition.mRetryIntervalMs); in waitFor()
176 logAlways("***Waiting for " + condition.mMessage + " ... retry=" + i in waitFor()
178 if (condition.mOnRetry != null && i < condition.mRetryLimit) { in waitFor()
179 condition.mOnRetry.run(); in waitFor()
183 if (condition.mSatisfier.getAsBoolean()) { in waitFor()
[all …]
/cts/tests/location/common/src/android/location/cts/common/
DSoftAssert.java52 String actualResult, boolean condition) { in assertTrue() argument
53 if (condition) { in assertTrue()
78 String actualResult, boolean condition) { in assertTrue() argument
79 assertTrue(message, null, expectedResult, actualResult, condition); in assertTrue()
97 boolean condition) { in assertTrueAsWarning() argument
98 if (condition) { in assertTrueAsWarning()
122 public void assertTrue(String message, boolean condition) { in assertTrue() argument
123 assertOrWarnTrue(true, message, condition); in assertTrue()
133 public void assertOrWarnTrue(boolean strict, String message, boolean condition) { in assertOrWarnTrue() argument
134 if (condition) { in assertOrWarnTrue()
[all …]
/cts/tests/tests/appop/AppThatCanBeForcedIntoForegroundStates/src/android/app/appops/cts/appthatcanbeforcedintoforegroundstates/
DAppOpsForegroundControlActivity.kt27 private val condition = lock.newCondition() constant
36 condition.await() in waitUntilCreated()
44 condition.await() in waitUntilBackground()
52 condition.await() in waitUntilForeground()
62 condition.await() in finish()
74 condition.signalAll() in onCreate()
83 condition.signalAll() in onResume()
92 condition.signalAll() in onPause()
102 condition.signalAll() in onDestroy()
DAppOpsForegroundControlForegroundService.kt30 private val condition = lock.newCondition() constant
38 condition.await() in waitUntilStarted()
48 condition.signalAll() in stop()
66 condition.signalAll() in onStartCommand()
76 condition.signalAll() in onUnbind()
DAppOpsForegroundControlLocationForegroundService.kt31 private val condition = lock.newCondition() constant
39 condition.await() in waitUntilStarted()
49 condition.signalAll() in stop()
68 condition.signalAll() in onStartCommand()
78 condition.signalAll() in onUnbind()
/cts/tests/app/src/android/app/cts/
DConditionTest.java41 Condition condition = new Condition(mConditionId, mSummary, mState); in testDescribeContents() local
42 assertEquals(expected, condition.describeContents()); in testDescribeContents()
46 Condition condition = new Condition(mConditionId, mSummary, mState); in testConstructor() local
47 assertEquals(mConditionId, condition.id); in testConstructor()
48 assertEquals(mSummary, condition.summary); in testConstructor()
49 assertEquals("", condition.line1); in testConstructor()
50 assertEquals("", condition.line2); in testConstructor()
51 assertEquals(mState, condition.state); in testConstructor()
52 assertEquals(-1, condition.icon); in testConstructor()
53 assertEquals(Condition.FLAG_RELEVANT_ALWAYS, condition.flags); in testConstructor()
[all …]
DActivityManagerProcessErrorStateInfoTest.java40 int condition = 1; in testWriteToParcel() local
48 mErrorStateInfo.condition = condition; in testWriteToParcel()
62 assertEquals(condition, values.condition); in testWriteToParcel()
74 int condition = 1; in testReadFromParcel() local
82 mErrorStateInfo.condition = condition; in testReadFromParcel()
96 assertEquals(condition, values.condition); in testReadFromParcel()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DPollingCheck.java63 public static void check(CharSequence message, long timeout, Callable<Boolean> condition) in check() argument
66 if (condition.call()) { in check()
77 public static void waitFor(final PollingCheckCondition condition) { in waitFor() argument
81 return condition.canProceed(); in waitFor()
86 public static void waitFor(long timeout, final PollingCheckCondition condition) { in waitFor() argument
90 return condition.canProceed(); in waitFor()
DMatcherUtils.java93 public static Matcher<Throwable> hasMessageThat(Matcher<? super String> condition) {
94 return propertyMatches("message", Throwable::getMessage, condition);
101 public static Matcher<AccessibilityNodeInfo> hasTextThat(Matcher<? super String> condition) {
102 return propertyMatches("text", AccessibilityNodeInfo::getText, condition);
125 E exception, Matcher<? super E> condition) throws AssertionError {
127 assertThat(exception, condition);
DTestUtils.java107 public static void waitOn(Object notifyLock, BooleanSupplier condition, in waitOn() argument
110 if (condition.getAsBoolean()) return; in waitOn()
115 while (!condition.getAsBoolean() && timeSlept < timeoutMs) { in waitOn()
120 if (!condition.getAsBoolean()) { in waitOn()
DAccessibilityNodeInfoUtils.kt33 condition: (AccessibilityNodeInfo) -> Boolean in AccessibilityNodeInfo()
36 child?.depthFirstSearch(condition)?.let { return it } in AccessibilityNodeInfo()
38 if (condition(this)) return this in AccessibilityNodeInfo()
/cts/tests/tests/appop/src/android/app/appops/cts/
DUidStateForceActivity.kt27 private val condition = lock.newCondition() constant
36 condition.await() in waitForResumed()
44 condition.await() in waitForDestroyed()
61 condition.signalAll() in onResume()
78 condition.signalAll() in onDestroy()
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/
DImeEventStreamTestUtils.java82 @NonNull Predicate<ImeEvent> condition, long timeout) throws TimeoutException { in expectEvent() argument
83 return expectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout); in expectEvent()
103 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) in expectEvent() argument
115 combinedCondition = condition; in expectEvent()
118 combinedCondition = event -> event.isEnterEvent() && condition.test(event); in expectEvent()
121 combinedCondition = event -> !event.isEnterEvent() && condition.test(event); in expectEvent()
225 @NonNull Predicate<ImeEvent> condition, long timeout) {
226 notExpectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout);
242 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) {
246 combinedCondition = condition;
[all …]
/cts/hostsidetests/theme/app/src/android/theme/app/
DConditionCheck.java49 public ConditionCheck addCondition(String summary, Supplier<Boolean> condition) { in addCondition() argument
50 mConditions.add(new Pair<>(summary, condition)); in addCondition()
68 mRemainingConditions.removeIf(condition -> condition.second.get()); in run()
77 mRemainingConditions.forEach(condition -> in run()
78 buffer.append("\n").append(condition.first)); in run()
/cts/hostsidetests/inputmethodservice/common/src/android/inputmethodservice/cts/common/
DBusyWaitUtils.java56 public static void pollingCheck(PollingCondition condition, long timeout, String message) in pollingCheck() argument
58 if (waitFor(condition, timeout)) { in pollingCheck()
71 static boolean waitFor(PollingCondition condition, long timeout) throws Exception { in waitFor() argument
73 if (condition.check()) { in waitFor()
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/unit/
DContentCaptureConditionTest.java47 final ContentCaptureCondition condition = in testValid() local
49 assertThat(condition).isNotNull(); in testValid()
50 assertThat(condition.getLocusId()).isSameAs(mLocusId); in testValid()
51 assertThat(condition.getFlags()).isSameAs(FLAG_IS_REGEX); in testValid()
/cts/tests/tests/provider/src/android/provider/cts/contacts/
DCallLogTest.java78 private void waitUntilConditionIsTrueOrTimeout(Condition condition, long timeout, in waitUntilConditionIsTrueOrTimeout() argument
81 while (!condition.expected().equals(condition.actual()) in waitUntilConditionIsTrueOrTimeout()
85 assertEquals(description, condition.expected(), condition.actual()); in waitUntilConditionIsTrueOrTimeout()
/cts/hostsidetests/securitybulletin/securityPatch/includes/
Dcommon.h26 #define FAIL_CHECK(condition) \ argument
27 if (!(condition)) { \
28 fprintf(stderr, "Check failed:\n\t" #condition "\n\tLine: %d\n", \
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DInputMethodVisibilityVerifier.java58 private static boolean waitUntil(long timeout, @NonNull Predicate<UiAutomation> condition) { in waitUntil() argument
75 if (condition.test(uiAutomation)) { in waitUntil()
80 if (condition.test(uiAutomation)) { in waitUntil()
84 return condition.test(uiAutomation); in waitUntil()
DTestUtils.java76 @NonNull BooleanSupplier condition, long timeout, String message) in waitOnMainUntil()
86 if (condition.getAsBoolean()) { in waitOnMainUntil()
107 public static void waitOnMainUntil(@NonNull BooleanSupplier condition, long timeout) in waitOnMainUntil() argument
109 waitOnMainUntil(condition, timeout, ""); in waitOnMainUntil()
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/
DMatcherUtils.java91 public static Matcher<Throwable> hasMessageThat(Matcher<? super String> condition) {
92 return propertyMatches("message", Throwable::getMessage, condition);
115 E exception, Matcher<? super E> condition) throws AssertionError {
117 assertThat(exception, condition);
/cts/tests/tests/telephony/current/src/android/telephony/ims/cts/
DImsCallForwardInfoTest.java37 int condition = 1; // ImsUtInterface#CDIV_CF_BUSY in createParcelUnparcel() local
43 ImsCallForwardInfo info = new ImsCallForwardInfo(condition, status, toA, serviceClass, in createParcelUnparcel()
53 assertEquals(condition, unparceledInfo.getCondition()); in createParcelUnparcel()
/cts/hostsidetests/numberblocking/app/src/com/android/cts/numberblocking/hostside/
DCallBlockingTest.java162 private void waitUntilConditionIsTrueOrTimeout(Condition condition, long timeout, in waitUntilConditionIsTrueOrTimeout() argument
165 while (!condition.expected().equals(condition.actual()) in waitUntilConditionIsTrueOrTimeout()
169 assertEquals(description, condition.expected(), condition.actual()); in waitUntilConditionIsTrueOrTimeout()
/cts/tools/vm-tests-tf/src/dot/junit/
DDxAbstractMain.java142 static public void assertTrue(boolean condition) { in assertTrue() argument
143 if (!condition) in assertTrue()
147 static public void assertFalse(boolean condition) { in assertFalse() argument
148 if (condition) in assertFalse()
/cts/tests/tests/telecom/src/android/telecom/cts/
DCallScreeningServiceTest.java252 private void waitUntilConditionIsTrueOrTimeout(Condition condition, long timeout,
255 while (!condition.expected().equals(condition.actual())
259 assertEquals(description, condition.expected(), condition.actual());

123