Methods Summary |
---|
public abstract com.android.internal.util.AsyncService$AsyncServiceInfo | createHandler()Create the service's handler returning AsyncServiceInfo.
|
public android.os.Handler | getHandler()Get the handler
return mHandler;
|
public android.os.IBinder | onBind(android.content.Intent intent)Returns the Messenger's binder.
return mMessenger.getBinder();
|
public void | onCreate()onCreate
super.onCreate();
mAsyncServiceInfo = createHandler();
mHandler = mAsyncServiceInfo.mHandler;
mMessenger = new Messenger(mHandler);
|
public void | onDestroy()Called when service is destroyed. After returning the
service is dead and no more processing should be expected
to occur.
if (DBG) Slog.d(TAG, "onDestroy");
Message msg = mHandler.obtainMessage();
msg.what = CMD_ASYNC_SERVICE_DESTROY;
mHandler.sendMessage(msg);
|
public int | onStartCommand(android.content.Intent intent, int flags, int startId)Sends the CMD_ASYNC_SERVICE_ON_START_INTENT message.
if (DBG) Slog.d(TAG, "onStartCommand");
Message msg = mHandler.obtainMessage();
msg.what = CMD_ASYNC_SERVICE_ON_START_INTENT;
msg.arg1 = flags;
msg.arg2 = startId;
msg.obj = intent;
mHandler.sendMessage(msg);
return mAsyncServiceInfo.mRestartFlags;
|