Code example for BlockingQueue

Methods: clear, size

0
	 
	 
	/* "stopStream", "()I" */ 
	public int stopStream() { 
		Log.w(TAG, "Stopping GPS stream");
		Log.w(TAG, "There are "+Integer.toString(locQueue.size())+" elements left in the queue");
		locationManager.removeUpdates(locationListener);
		try { 
		handlerThread.quit();
		handlerThread.interrupt();
		} catch (Exception e) { 
			e.printStackTrace();
			return 0; 
		} 
		isStreaming = false;
		locQueue.clear();
		return 1; 
	} 
	 
	/* "changeFrequency", "(J)I" */ 
	public int changeFrequency(/*long minTime*/) {