FileDocCategorySizeDatePackage
DisplayThread.javaAPI DocAndroid 5.1 API1839Thu Mar 12 22:22:42 GMT 2015com.android.server

DisplayThread

public final class DisplayThread extends ServiceThread
Shared singleton foreground thread for the system. This is a thread for operations that affect what's on the display, which needs to have a minimum of latency. This thread should pretty much only be used by the WindowManager, DisplayManager, and InputManager to perform quick operations in real time.

Fields Summary
private static DisplayThread
sInstance
private static android.os.Handler
sHandler
Constructors Summary
private DisplayThread()

        super("android.display", android.os.Process.THREAD_PRIORITY_DISPLAY, false /*allowIo*/);
    
Methods Summary
private static voidensureThreadLocked()

        if (sInstance == null) {
            sInstance = new DisplayThread();
            sInstance.start();
            sHandler = new Handler(sInstance.getLooper());
        }
    
public static com.android.server.DisplayThreadget()

        synchronized (DisplayThread.class) {
            ensureThreadLocked();
            return sInstance;
        }
    
public static android.os.HandlergetHandler()

        synchronized (DisplayThread.class) {
            ensureThreadLocked();
            return sHandler;
        }