commit | dd608c8285a796fb68fcb5a381b0250a8986f02e | [log] [tgz] |
---|---|---|
author | Yamaguchi Yasunori <yasunori.xa.yamaguchi@sonymobile.com> | Wed Apr 09 12:35:35 2014 +0900 |
committer | Zoran Jovanovic <zoran.jovanovic@sony.com> | Fri Oct 06 11:29:34 2017 +0200 |
tree | 44d2eb899055643b039131d24ca2d643944f5e86 | |
parent | e4a7a8c5f21c74ff699eae449816fd0bc6843afc [diff] |
Change SharedPreferences.Editor.commit() to apply() Calling SharedPreferences.Editor.commit() from the main thread results in a synchronous write to the file system, giving a risk for ANR. Replace it with asyncronous apply(), which is safe since the result of commit() was never checked in the first place. Bug: 28689077 Test: run with StrictMode on Change-Id: I63342775f78ba552db8a6a03d8172b43f82be2a9