Lines Matching defs:Looper
31 * <p>This is a typical example of the implementation of a Looper thread,
33 * initial Handler to communicate with the Looper.
40 * Looper.prepare();
48 * Looper.loop();
52 public final class Looper {
53 private static final String TAG = "Looper";
56 static final ThreadLocal<Looper> sThreadLocal = new ThreadLocal<Looper>();
57 private static Looper sMainLooper; // guarded by Looper.class
76 throw new RuntimeException("Only one Looper may be created per thread");
78 sThreadLocal.set(new Looper(quitAllowed));
89 synchronized (Looper.class) {
91 throw new IllegalStateException("The main Looper has already been prepared.");
99 public static Looper getMainLooper() {
100 synchronized (Looper.class) {
110 final Looper me = myLooper();
112 throw new RuntimeException("No Looper; Looper.prepare() wasn't called on this thread.");
157 * Return the Looper object associated with the current thread. Returns
158 * null if the calling thread is not associated with a Looper.
160 public static Looper myLooper() {
165 * Control logging of messages as they are processed by this Looper. If
179 * thread. This must be called from a thread running a Looper, or a
186 private Looper(boolean quitAllowed) {
236 * Posts a synchronization barrier to the Looper's message queue.
278 * Return the Thread associated with this Looper.
305 return "Looper (" + mThread.getName() + ", tid " + mThread.getId()