apply() changes the in-memory instance of SharedPreferences and writes to the disk asynchronously, rather than synchronously, which commit() does. Since these are done on the UI thread, they should be asynchronous.
apply() changes the in-memory instance of SharedPreferences and writes to the disk asynchronously, rather than synchronously, which commit() does. Since these are done on the UI thread, they should be asynchronous.