boolean clearAll ( ) { SharedPreferences . Editor editor = sharedPreferences . edit ( ) ; Map < String , ? > all = sharedPreferences . getAll ( ) ; //noinspection Convert2streamapi for ( String key : all . keySet ( ) ) { editor . remove ( key ) ; } return editor . commit ( ) ; }
Clear all entries in internal shared preferences file .