Home
last modified time | relevance | path

Searched refs:getWithContext (Results 1 – 3 of 3) sorted by relevance

/cts/common/device-side/bedstead/activitycontext/src/test/java/com/android/activitycontext/
DActivityContextTest.java44 assertThrows(NullPointerException.class, () -> ActivityContext.getWithContext(null)); in getWithContext_nullRunnable_throwsException()
54 boolean contextIsActivityContext = ActivityContext.getWithContext(Objects::nonNull); in getWithContext_passesActivityContext()
61 boolean contextIsActivityContext = ActivityContext.getWithContext( in getWithContext_oneArgument_passesActivityContext()
69 String passedString = ActivityContext.getWithContext(STRING_VALUE, (context, str) -> str); in getWithContext_oneArgument_passesFirstArgument()
76 boolean contextIsActivityContext = ActivityContext.getWithContext( in getWithContext_twoArguments_passesActivityContext()
84 String passedString = ActivityContext.getWithContext( in getWithContext_twoArguments_passesFirstArgument()
92 int passedInt = ActivityContext.getWithContext( in getWithContext_twoArguments_passesSecondArgument()
100 boolean contextIsActivityContext = ActivityContext.getWithContext( in getWithContext_threeArguments_passesActivityContext()
109 String passedString = ActivityContext.getWithContext( in getWithContext_threeArguments_passesFirstArgument()
117 int passedInt = ActivityContext.getWithContext( in getWithContext_threeArguments_passesSecondArgument()
[all …]
/cts/common/device-side/bedstead/activitycontext/src/main/java/com/android/activitycontext/
DActivityContext.java71 public static <E> E getWithContext(Function<Activity, E> runnable) throws InterruptedException { in getWithContext() method in ActivityContext
132 getWithContext((inContext) -> {runnable.accept(inContext); return null; }); in runWithContext() method
136 public static <E, F> F getWithContext(E arg1, in getWithContext() method in ActivityContext
138 return getWithContext((inContext) -> runnable.apply(inContext, arg1)); in getWithContext()
147 getWithContext((inContext) -> {runnable.accept(inContext, arg1); return null; }); in runWithContext() method
151 public static <E, F, G> G getWithContext(E arg1, F arg2, in getWithContext() method in ActivityContext
153 return getWithContext((inContext) -> runnable.apply(inContext, arg1, arg2)); in getWithContext()
157 public static <E, F, G, H> H getWithContext(E arg1, F arg2, G arg3, in getWithContext() method in ActivityContext
159 return getWithContext((inContext) -> runnable.apply(inContext, arg1, arg2, arg3)); in getWithContext()
/cts/common/device-side/bedstead/queryable/src/test/java/com/android/queryable/info/
DActivityInfoTest.java46 ActivityInfo activityInfo = ActivityContext.getWithContext(c -> in instanceConstructor_setsClass()