Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: Use apply() instead of commit() for SharedPreference changes. #1242

Merged
merged 1 commit into from Oct 10, 2014

Conversation

lioncash
Copy link
Member

@lioncash lioncash commented Oct 9, 2014

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 (doing blocking IO on it isn't a neat idea).

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.
@lioncash lioncash changed the title Android: Use apply() instead of commit() for changes Android: Use apply() instead of commit() for SharedPreference changes. Oct 9, 2014
@Sonicadvance1
Copy link
Contributor

LGTM

lioncash added a commit that referenced this pull request Oct 10, 2014
Android: Use apply() instead of commit() for SharedPreference changes.
@lioncash lioncash merged commit 98d9a38 into dolphin-emu:master Oct 10, 2014
@lioncash lioncash deleted the sync branch October 10, 2014 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants