@Override public void addToWhitelist(String item){
  final Set<String> stringSet=sharedPreferences.getStringSet(KEY_WHITELIST,new HashSet<String>());
  stringSet.add(item);
  SharedPreferences.Editor editor=sharedPreferences.edit();
  editor.remove(KEY_WHITELIST);
  editor.putStringSet(KEY_WHITELIST,stringSet);
  editor.commit();
}

@ Override public void addToWhitelist ( String item ) { final Set < String > stringSet = sharedPreferences . getStringSet ( KEY_WHITELIST , new HashSet < String > ( ) ) ; stringSet . add ( item ) ; SharedPreferences . Editor editor = sharedPreferences . edit ( ) ; editor . remove ( KEY_WHITELIST ) ; editor . putStringSet ( KEY_WHITELIST , stringSet ) ; editor . commit ( ) ; }
adds item to whitelist
