Code example for ExecutorService

Methods: isShutdown, shutdown

0
	 */ 
	public void cancel() { 
 
		// We could also terminate it immediately, 
		// but that may lead to synchronization issues. 
		if (!mExecutor.isShutdown()) {
			mExecutor.shutdown();
		} 
 
	} 
 
	public File getCachedImageFile(final String cache_dir_name, final String url) {
		if (cache_dir_name == null || url == null) return null;
		final File cache_dir = getBestCacheDir(mContext, cache_dir_name);
		if (cache_dir == null) return null;
		final File cache = new File(cache_dir, getFilename(url));
		if (ImageValidator.checkImageValidity(cache))
			return cache;
		else { 
			preloadImage(cache_dir_name, url);
		}