Code example for HashSet

Methods: removeAll

0
			 
			Set<String> cachedSources = DDGUtils.getCachedSources();
			// XXX cachedSources is not expected to be null during a migration 
			// since before APP VERSION_CODE 43, source response is always cached  
			if(cachedSources != null) {
				Set<String> oldDisallowed = new HashSet<String>(cachedSources);
				oldDisallowed.removeAll(oldAllowed);
				saveUserDisallowedSources(oldDisallowed);
			} 
			sourcesWereMigratedRightNow = true;
		}		 
	} 
	 
	public static boolean shouldShowNewSourcesDialog(){ 
		return NEW_SOURCES && sourcesWereMigratedRightNow;
	} 
	 
	public static void newSourcesDialogWasShown(){ 
		NEW_SOURCES = false;
	}