Home | History | Annotate | Download | only in util

Lines Matching refs:Activity

19 import android.app.Activity;
29 private static final Callable<Activity> GET_RUNNING_ACTIVITY =
30 new Callable<Activity>() {
32 public Activity call() {
33 Iterator<Activity> activityIterator =
40 private static Supplier<Activity> runningActivitySupplier =
41 new Supplier<Activity>() {
43 public Activity get() {
59 * Sets the Supplier for the running (a.k.a. resumed or foreground) activity. If a custom runner
63 public static synchronized void setRunningActivitySupplier(Supplier<Activity> activitySupplier) {
68 public static Activity getRunningActivity() {
73 * Waits for idle on main looper, then gets the running (a.k.a. resumed or foreground) activity.
75 * @return the currently running activity, or null if no activity has focus.
77 public static Activity getRunningActivity(long timeoutMillis) {
78 // It's safe to check running activity only when the main looper is idle.
88 * Gets the running (a.k.a. resumed or foreground) activity without waiting for idle on main
91 * @return the currently running activity, or null if no activity has focus.
93 public static synchronized Activity getRunningActivityNoWait() {