/cts/tests/framework/base/windowmanager/jetpack/src/android/server/wm/jetpack/utils/ |
D | Condition.java | 165 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/framework/base/windowmanager/util/src/android/server/wm/ |
D | Condition.java | 165 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 …]
|
D | InputMethodVisibilityVerifier.java | 58 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/tests/neuralnetworks/java_test/jni/ |
D | Utils.h | 30 #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/common/device-side/util-axt/src/com/android/compatibility/common/util/ |
D | PollingCheck.java | 84 public <E> E runWaitAndReturnResult(Supplier<E> supplier, Function<E, Boolean> condition) { in runWaitAndReturnResult() argument 86 if (condition.apply(output)) { in runWaitAndReturnResult() 98 if (condition.apply(output)) { in runWaitAndReturnResult() 108 public static void check(CharSequence message, long timeout, Callable<Boolean> condition) in check() argument 111 if (condition.call()) { in check() 122 public static void waitFor(final PollingCheckCondition condition) { in waitFor() argument 126 return condition.canProceed(); in waitFor() 131 public static void waitFor(final PollingCheckCondition condition, String errorMessage) { in waitFor() argument 135 return condition.canProceed(); in waitFor() 140 public static void waitFor(long timeout, final PollingCheckCondition condition) { in waitFor() argument [all …]
|
D | MatcherUtils.java | 93 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);
|
/cts/tests/tests/appop/AppForDiscreteTest/src/android/app/appops/cts/appfordiscretetest/ |
D | AppOpsForegroundControlActivity.kt | 27 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()
|
D | AppOpsForegroundControlForegroundService.kt | 30 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()
|
D | AppOpsForegroundControlLocationForegroundService.kt | 31 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/ |
D | AppOpsForegroundControlActivity.kt | 27 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()
|
D | AppOpsForegroundControlForegroundService.kt | 30 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()
|
D | AppOpsForegroundControlLocationForegroundService.kt | 31 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/location/common/src/android/location/cts/common/ |
D | SoftAssert.java | 52 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/security/src/android/security/cts/ |
D | CVE_2022_20493.java | 50 private boolean checkFields(Condition condition, boolean checkLine) { in checkFields() argument 52 boolean status = (mLongUri.toString().length() <= condition.id.toString().length()) in checkFields() 53 || (INPUT_STRING_LENGTH <= condition.summary.length()); in checkFields() 55 status = status || (INPUT_STRING_LENGTH <= condition.line1.length()) in checkFields() 56 || (INPUT_STRING_LENGTH <= condition.line2.length()); in checkFields() 75 Condition condition; in setFieldsUsingReflection() local 77 condition = new Condition(mValidUri, mValidString, mValidString, mValidString, -1, in setFieldsUsingReflection() 80 condition = new Condition(mValidUri, mValidString, Condition.STATE_TRUE); in setFieldsUsingReflection() 86 id.set(condition, mLongUri); in setFieldsUsingReflection() 89 summary.set(condition, mLongString); in setFieldsUsingReflection() [all …]
|
/cts/tests/tests/telecom-apps/Utils/src/android/telecom/cts/apps/ |
D | WaitUntil.java | 41 Condition condition, in waitUntilConditionIsTrueOrTimeout() argument 49 while (!Objects.equals(condition.expected(), condition.actual()) in waitUntilConditionIsTrueOrTimeout() 55 assertEquals(description, condition.expected(), condition.actual()); in waitUntilConditionIsTrueOrTimeout() 64 Condition condition) { in waitUntilConditionIsTrueOrTimeout() argument 69 while (!Objects.equals(condition.expected(), condition.actual()) in waitUntilConditionIsTrueOrTimeout() 75 assertEquals(condition.expected(), condition.actual()); in waitUntilConditionIsTrueOrTimeout() 80 Condition condition) { in waitUntilConditionIsTrueOrReturnFalse() argument 85 while (!Objects.equals(condition.expected(), condition.actual()) in waitUntilConditionIsTrueOrReturnFalse() 91 return (condition.expected().equals(condition.actual())); in waitUntilConditionIsTrueOrReturnFalse()
|
/cts/tests/inputmethod/mocka11yime/client/src/com/android/cts/mocka11yime/ |
D | MockA11yImeEventStreamUtils.java | 81 @NonNull Predicate<MockA11yImeEvent> condition, long timeout) throws TimeoutException { in expectA11yImeEvent() argument 82 return expectA11yImeEvent(stream, condition, in expectA11yImeEvent() 103 @NonNull Predicate<MockA11yImeEvent> condition, in expectA11yImeEvent() argument 114 combinedCondition = condition; in expectA11yImeEvent() 117 combinedCondition = event -> event.isEnterEvent() && condition.test(event); in expectA11yImeEvent() 120 combinedCondition = event -> !event.isEnterEvent() && condition.test(event); in expectA11yImeEvent() 198 @NonNull Predicate<MockA11yImeEvent> condition, long timeout) { 199 notExpectA11yImeEvent(stream, condition, 216 @NonNull Predicate<MockA11yImeEvent> condition, 221 combinedCondition = condition; [all …]
|
/cts/tests/app/src/android/app/cts/ |
D | ActivityManagerProcessErrorStateInfoTest.java | 40 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/tests/tests/notification/src/android/app/notification/current/cts/ |
D | ConditionTest.java | 57 Condition condition = new Condition(mConditionId, mSummary, mState); in testDescribeContents() local 58 assertEquals(expected, condition.describeContents()); in testDescribeContents() 63 Condition condition = new Condition(mConditionId, mSummary, mState); in testConstructor() local 65 condition = new Condition(mConditionId, mSummary, mState, mSource); in testConstructor() 67 assertEquals(mConditionId, condition.id); in testConstructor() 68 assertEquals(mSummary, condition.summary); in testConstructor() 69 assertEquals("", condition.line1); in testConstructor() 70 assertEquals("", condition.line2); in testConstructor() 71 assertEquals(mState, condition.state); in testConstructor() 72 assertEquals(-1, condition.icon); in testConstructor() [all …]
|
/cts/tests/tests/appop/src/android/app/appops/cts/ |
D | UidStateForceActivity.kt | 28 private val condition = lock.newCondition() constant 37 if (!condition.await(10, TimeUnit.SECONDS)) { in waitForResumed() 47 condition.await() in waitForDestroyed() 64 condition.signalAll() in onResume() 81 condition.signalAll() in onDestroy()
|
/cts/hostsidetests/theme/app/src/android/theme/app/ |
D | ConditionCheck.java | 49 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/ |
D | BusyWaitUtils.java | 56 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/tests/companion/uicommon/src/android/companion/cts/uicommon/ |
D | CompanionDeviceManagerUi.kt | 157 condition: SearchCondition<Boolean>, in wait() 161 if (!wait(condition, timeout.inWholeMilliseconds)) error(message) in wait() 164 protected fun UiDevice.waitShort(condition: SearchCondition<Boolean>, message: String) = 165 wait(condition, message, 1.seconds) 168 condition: SearchCondition<UiObject2>, 172 wait(condition, timeout.inWholeMilliseconds) ?: error(message) 175 condition: SearchCondition<UiObject2>, 177 ): UiObject2 = waitAndFind(condition, message, 1.seconds) 180 condition: SearchCondition<UiObject2>, 182 ): UiObject2 = waitAndFind(condition, message, 10.seconds)
|
/cts/tests/contentcaptureservice/src/android/contentcaptureservice/cts/unit/ |
D | ContentCaptureConditionTest.java | 47 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/ |
D | common.h | 26 #define FAIL_CHECK(condition) \ argument 27 if (!(condition)) { \ 28 fprintf(stderr, "Check failed:\n\t" #condition "\n\tLine: %d\n", \
|
/cts/hostsidetests/appsecurity/src/android/appsecurity/cts/ |
D | MatcherUtils.java | 91 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);
|