Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5913630e authored by Brad Fitzpatrick's avatar Brad Fitzpatrick
Browse files

Don't re-read SharedPreferences unnecessarily.

Previously reads were only cached once a write occurred because
loading didn't set the stat metadata, thus the
sp.hasFileChangedUnexpectedly() check always fired on reading.

Now the initial read populates the stat info, so getSharedPreference()
repeatedly bypasses reading from disk, even wtihout writes.

This was probably a regression from apply() being added in
Gingerbread.

Bug: 3211034
Change-Id: Ifa0bbb27c53a4099544950a4f822fab1fc23a47d
parent de8da848
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment