FileDocCategorySizeDatePackage
PrintSpoolerProvider.javaAPI DocAndroid 5.1 API1898Thu Mar 12 22:22:42 GMT 2015com.android.printspooler.model

PrintSpoolerProvider

public class PrintSpoolerProvider extends Object implements android.content.ServiceConnection

Fields Summary
private final android.content.Context
mContext
private final Runnable
mCallback
private PrintSpoolerService
mSpooler
Constructors Summary
public PrintSpoolerProvider(android.content.Context context, Runnable callback)

        mContext = context;
        mCallback = callback;
        Intent intent = new Intent(mContext, PrintSpoolerService.class);
        mContext.bindService(intent, this, 0);
    
Methods Summary
public voiddestroy()

        if (mSpooler != null) {
            mContext.unbindService(this);
        }
    
public PrintSpoolerServicegetSpooler()

        return mSpooler;
    
public voidonServiceConnected(android.content.ComponentName name, android.os.IBinder service)

        mSpooler = ((PrintSpoolerService.PrintSpooler) service).getService();
        if (mSpooler != null) {
            mCallback.run();
        }
    
public voidonServiceDisconnected(android.content.ComponentName name)

        /* do nothing - we are in the same process */