Code example for ExecutorService

Methods: isShutdownshutdown

	public void cancel() { 
		// We could also terminate it immediately, 
		// but that may lead to synchronization issues. 
		if (!mExecutor.isShutdown()) {
	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);
Experience pair programming with AI  Get Codota for Java