Code example for BlockingQueue

Methods: removeAll

0
	/** 
	 * Method that stops the service, removes everything from the waiting list 
	 */ 
	public void stopService() { 
 
		waitingList.removeAll(waitingList);
		isWaitingListRunning.set(false);
		callbackListener = null;
		isTheServiceRunning.set(false);
 
		try { 
			bluetoothSocket.close();
		} catch (IOException e) {
		} 
 
		stopSelf();
	} 
 
	/** 
	 * Binder imported directly from Android OBD Project. Runs the waiting list 
	 * when jobs are added to it