Home | History | Annotate | Download | only in os

Lines Matching refs:looper

20  * Handy class for starting a new thread that has a looper. The looper can then be 
26 Looper mLooper;
46 * setup before Looper loops.
54 Looper.prepare();
56 mLooper = Looper.myLooper();
61 Looper.loop();
66 * This method returns the Looper associated with this thread. If this thread not been started
68 * has been started, this method will block until the looper has been initialized.
69 * @return The looper.
71 public Looper getLooper() {
76 // If the thread has been started, wait until the looper has been created.
89 * Quits the handler thread's looper.
91 * Causes the handler thread's looper to terminate without processing any
94 * Any attempt to post messages to the queue after the looper is asked to quit will fail.
98 * before the looper terminates. Consider using {@link #quitSafely} instead to ensure
102 * @return True if the looper looper has been asked to quit or false if the
108 Looper looper = getLooper();
109 if (looper != null) {
110 looper.quit();
117 * Quits the handler thread's looper safely.
119 * Causes the handler thread's looper to terminate as soon as all remaining messages
123 * Any attempt to post messages to the queue after the looper is asked to quit will fail.
128 * Otherwise the looper is asked to quit and true is returned.
131 * @return True if the looper looper has been asked to quit or false if the
135 Looper looper = getLooper();
136 if (looper != null) {
137 looper.quitSafely();