Code example for Looper

Methods: getThreadquit

0
		this.mServiceHandler = new ServiceHandler(this.mServiceLooper);
	} 
 
	@Override 
	public void onDestroy() { 
		Thread localThread = this.mServiceLooper.getThread();
		if ((localThread != null) && (localThread.isAlive())) {
			localThread.interrupt();
		} 
		this.mServiceLooper.quit();
		Log.d(LOG_TAG,"onDestroy");
	} 
 
	protected abstract void onHandleIntent(Intent paramIntent);
	protected abstract boolean shouldStop(); 
 
	@Override 
	public void onStart(Intent paramIntent, int startId) {
	    if ( !this.mServiceHandler.hasMessages(WHAT_MESSAGE) ) {
	        Message localMessage = this.mServiceHandler.obtainMessage();
	        localMessage.arg1 = startId;