MessageQueue

Class of android.os · MessageQueue.java · Android's reference

public final class MessageQueue

A looper's messages, by the time they are due. Synchronization barriers hold back the synchronous messages behind them, as Choreographer uses them. The wait for the next message is a Waiter: a monitor wait, or for the main thread the window's event queue (snx.android.ui), so that input and frames wake it as Android's native Looper's epoll does.

Nested types

Methods

public synchronized void setWaiter(Waiter w) source

The waiter of the queue's thread: the window layer sets the main thread's.

public synchronized boolean isIdle() source
public void addIdleHandler(IdleHandler handler) source
public void removeIdleHandler(IdleHandler handler) source
public void addOnFileDescriptorEventListener(java.io.FileDescriptor fd, int events, OnFileDescriptorEventListener listener) throws UnsupportedOperationException source
public void removeOnFileDescriptorEventListener(java.io.FileDescriptor fd) empty body source
public int postSyncBarrier() source

A barrier that holds back the synchronous messages after when, until removeSyncBarrier.

public void removeSyncBarrier(int token) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.