Home
last modified time | relevance | path

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

1234

/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/tests/neuralnetworks/java_test/jni/
DUtils.h30 #define ASSERT_OR_RETURN(condition) \ argument
31 if ((condition)) \
33 else if (!::android::nn::cts::fail(env, "assert failed on (%s) at %s:%d", #condition, \
39 #define ASSERT_OR_RETURN_FALSE(condition) ASSERT_OR_RETURN((condition)) false argument
40 #define ASSERT_OR_RETURN_NULL(condition) ASSERT_OR_RETURN((condition)) nullptr argument
41 #define ASSERT_OR_RETURN_ZERO(condition) ASSERT_OR_RETURN((condition)) 0 argument
42 #define ASSERT_OR_RETURN_DEFAULT(condition) \ argument
43 ASSERT_OR_RETURN((condition)) {}
/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/AppForDiscreteTest/src/android/app/appops/cts/appfordiscretetest/
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/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.java74 public static void check(CharSequence message, long timeout, Callable<Boolean> condition) in check() argument
77 if (condition.call()) { in check()
88 public static void waitFor(final PollingCheckCondition condition) { in waitFor() argument
92 return condition.canProceed(); in waitFor()
97 public static void waitFor(long timeout, final PollingCheckCondition condition) { in waitFor() argument
101 return condition.canProceed(); in waitFor()
106 public static void waitFor(long timeout, BooleanSupplier condition, String errorMessage) { in waitFor() argument
110 return condition.getAsBoolean(); 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);
109 public static Matcher<AccessibilityNodeInfo> hasIdThat(Matcher<? super String> condition) {
110 return propertyMatches("id", AccessibilityNodeInfo::getViewIdResourceName, condition);
133 E exception, Matcher<? super E> condition) throws AssertionError {
135 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.kt36 condition: (AccessibilityNodeInfo) -> Boolean in AccessibilityNodeInfo()
39 child?.depthFirstSearch(condition)?.let { return it } in AccessibilityNodeInfo()
41 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/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/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()
234 @NonNull Predicate<ImeEvent> condition, long timeout) {
235 notExpectEvent(stream, condition, EventFilterMode.CHECK_ENTER_EVENT_ONLY, timeout);
251 @NonNull Predicate<ImeEvent> condition, EventFilterMode filterMode, long timeout) {
255 combinedCondition = condition;
[all …]
/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()).isSameInstanceAs(mLocusId); in testValid()
51 assertThat(condition.getFlags()).isSameInstanceAs(FLAG_IS_REGEX); in testValid()
/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/hostsidetests/graphics/framerateoverride/app/src/com/android/cts/graphics/framerateoverride/
DFrameRateOverrideTestActivity.java276 void observe(float initialRefreshRate, float expectedFrameRate, String condition) in observe() argument
282 public void observe(float initialRefreshRate, float expectedFrameRate, String condition) { in observe() argument
295 condition, in observe()
305 + "expected: %.2f observed: %.2f", condition, expectedFrameRate, fps), in observe()
321 ChoreographerThread(float expectedRefreshRate, String condition) in ChoreographerThread() argument
324 mCondition = condition; in ChoreographerThread()
372 public void observe(float initialRefreshRate, float expectedFrameRate, String condition) in observe() argument
374 ChoreographerThread thread = new ChoreographerThread(expectedFrameRate, condition); in observe()
383 public void observe(float initialRefreshRate, float expectedFrameRate, String condition) { in observe() argument
386 condition, mReportedDisplayRefreshRate)); in observe()
[all …]
/cts/tests/framework/base/windowmanager/src/android/server/wm/
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()
/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()
/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);

1234