Home | History | Annotate | Download | only in shadows

Lines Matching defs:looper

9 import android.os.Looper;
30 @Implements(Looper.class)
36 // Note that the main looper is handled differently and is not put in this hash, because we need to be able to
37 // "switch" the thread that the main looper is associated with.
38 private static Map<Thread, Looper> loopingLoopers = Collections.synchronizedMap(new WeakHashMap<Thread, Looper>());
40 private static Looper mainLooper;
42 private @RealObject Looper realObject;
48 // Blech. We need to keep the main looper because somebody might refer to it in a static
55 for (Looper looper : loopingLoopers.values()) {
56 synchronized (looper) {
57 if (!shadowOf(looper).quit) {
58 looper.quit();
62 shadowOf(looper).getScheduler().reset();
76 invokeConstructor(Looper.class, realObject, from(boolean.class, quitAllowed));
86 public static Looper getMainLooper() {
91 public static Looper myLooper() {
97 shadowOf(Looper.myLooper()).doLoop();
101 if (realObject != Looper.getMainLooper()) {
115 if (realObject == Looper.getMainLooper()) throw new RuntimeException("Main thread not allowed to quit");
144 return shadowOf(Looper.getMainLooper());
147 public static Looper getLooperForThread(Thread thread) {
151 public static void pauseLooper(Looper looper) {
152 shadowOf(looper).pause();
155 public static void unPauseLooper(Looper looper) {
156 shadowOf(looper).unPause();
281 * @deprecated Use a {@link android.os.Handler} instance to post to a looper.
299 * @deprecated Use a {@link android.os.Handler} instance to post to a looper.
335 if (realObject == Looper.getMainLooper() || RoboSettings.isUseGlobalScheduler()) {
354 * This scheduler is managed by the Looper's associated queue.