FileDocCategorySizeDatePackage
BackgroundThread.javaAPI DocAndroid 5.1 API1618Thu Mar 12 22:22:10 GMT 2015com.android.internal.os

BackgroundThread

public final class BackgroundThread extends android.os.HandlerThread
Shared singleton background thread for each process.

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

        super("android.bg", android.os.Process.THREAD_PRIORITY_BACKGROUND);
    
Methods Summary
private static voidensureThreadLocked()

        if (sInstance == null) {
            sInstance = new BackgroundThread();
            sInstance.start();
            sHandler = new Handler(sInstance.getLooper());
        }
    
public static com.android.internal.os.BackgroundThreadget()

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

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