Home
last modified time | relevance | path

Searched refs:supplier (Results 1 – 15 of 15) sorted by relevance

/cts/common/device-side/bedstead/nene/src/main/java/com/android/bedstead/nene/utils/
DRetry.java43 public static <E> Retry<E> logic(Poll.ValueSupplier<E> supplier) { in logic() argument
44 return new Retry<>(supplier); in logic()
54 private Retry(Poll.ValueSupplier<E> supplier) { in Retry() argument
55 mPoll = Poll.forValue(supplier) in Retry()
DPoll.java75 private Poll(String valueName, ValueSupplier<E> supplier) { in Poll() argument
77 mSupplier = supplier; in Poll()
87 public static <E> Poll<E> forValue(ValueSupplier<E> supplier) { in forValue() argument
88 return forValue("value", supplier); in forValue()
96 public static <E> Poll<E> forValue(String valueName, ValueSupplier<E> supplier) { in forValue() argument
97 return new Poll<>(valueName, supplier); in forValue()
/cts/common/device-side/util-axt/src/com/android/compatibility/common/util/
DPollingCheck.java80 public <E> E runWaitAndReturnResult(Supplier<E> supplier, Function<E, Boolean> condition) { in runWaitAndReturnResult() argument
81 E output = supplier.get(); in runWaitAndReturnResult()
93 output = supplier.get(); in runWaitAndReturnResult()
154 public static <E> E waitFor(long timeout, Supplier<E> supplier, in waitFor() argument
163 }.runWaitAndReturnResult(supplier, condition); in waitFor() argument
DSystemUtil.java229 public static <T> T runWithShellPermissionIdentity(@NonNull ThrowingSupplier<T> supplier) { in runWithShellPermissionIdentity() argument
232 runWithShellPermissionIdentity(automan, () -> result.set(supplier.get())); in runWithShellPermissionIdentity()
240 public static <T> T runWithShellPermissionIdentity(@NonNull ThrowingSupplier<T> supplier, in runWithShellPermissionIdentity() argument
244 runWithShellPermissionIdentity(automan, () -> result.set(supplier.get()), permissions); in runWithShellPermissionIdentity()
DShellIdentityUtils.java353 public static <T> T invokeWithShellPermissions(Supplier<T> supplier) { in invokeWithShellPermissions() argument
358 return supplier.get(); in invokeWithShellPermissions()
/cts/tests/inputmethod/mockime/src/com/android/cts/mockime/
DMockIme.java1061 @NonNull Supplier<T> supplier) {
1062 return recordEventInternal(eventName, supplier, new Bundle());
1066 @NonNull Supplier<T> supplier, @NonNull Bundle arguments) {
1079 result = supplier.get();
1097 void onVerify(String name, @NonNull BooleanSupplier supplier) {
1100 recordEventInternal("onVerify", supplier::getAsBoolean, arguments);
1111 boolean onEvaluateFullscreenMode(@NonNull BooleanSupplier supplier) {
1112 return recordEventInternal("onEvaluateFullscreenMode", supplier::getAsBoolean);
1115 boolean onEvaluateInputViewShown(@NonNull BooleanSupplier supplier) {
1116 return recordEventInternal("onEvaluateInputViewShown", supplier::getAsBoolean);
[all …]
DImeEventStream.java50 ImeEventStream(@NonNull Supplier<ImeEventArray> supplier) { in ImeEventStream() argument
51 this(supplier, 0 /* position */); in ImeEventStream()
54 private ImeEventStream(@NonNull Supplier<ImeEventArray> supplier, int position) { in ImeEventStream() argument
55 mEventSupplier = supplier; in ImeEventStream()
/cts/libs/rollback/src/com/android/cts/rollback/lib/
DRollbackUtils.java208 Supplier<List<RollbackInfo>> supplier, String packageName) throws InterruptedException { in waitForRollbackGone() argument
209 retry(supplier, rollbacks -> !hasRollbackInclude(rollbacks, packageName), in waitForRollbackGone()
213 private static <T> T retry(Supplier<T> supplier, Predicate<T> predicate, String message) in retry() argument
216 T result = supplier.get(); in retry()
/cts/tests/framework/base/biometrics/src/android/server/biometrics/
DUtils.java68 public static void waitForIdleService(@NonNull SensorStatesSupplier supplier) throws Exception { in waitForIdleService() argument
70 if (!supplier.getSensorStates().areAllSensorsIdle()) { in waitForIdleService()
83 public static void waitForBusySensor(int sensorId, @NonNull SensorStatesSupplier supplier) in waitForBusySensor() argument
86 if (!supplier.getSensorStates().sensorStates.get(sensorId).isBusy()) { in waitForBusySensor()
/cts/tests/inputmethod/src/android/view/inputmethod/cts/util/
DTestUtils.java66 public static <T> T getOnMainSync(@NonNull Supplier<T> supplier) { in getOnMainSync() argument
69 instrumentation.runOnMainSync(() -> result.set(supplier.get())); in getOnMainSync()
/cts/tests/framework/base/windowmanager/util/src/android/server/wm/
DCondition.java95 public Condition<T> setResultSupplier(Supplier<T> supplier) { in setResultSupplier() argument
96 mResultSupplier = supplier; in setResultSupplier()
/cts/tests/tests/packageinstaller/atomicinstall/src/com/android/tests/atomicinstall/
DAtomicInstallTest.java102 private static <T> T retry(Supplier<T> supplier, Predicate<T> predicate, String message) in retry() argument
105 T result = supplier.get(); in retry()
/cts/tests/tests/media/src/android/media/cts/
DMediaCodecBlockModelTest.java213 private Result runThread(Supplier<Result> supplier) throws InterruptedException { in runThread() argument
217 result.set(supplier.get()); in runThread()
/cts/tests/app/src/android/app/cts/
DActivityManagerTest.java1778 private boolean waitUntilTrue(long maxWait, Supplier<Boolean> supplier) throws Exception { in waitUntilTrue() argument
1783 } while (!(result = supplier.get()) && SystemClock.uptimeMillis() < deadLine); in waitUntilTrue()
DNotificationManagerTest.java3091 private <T> T uncheck(ThrowingSupplier<T> supplier) { in uncheck() argument
3093 return supplier.get(); in uncheck()