History log of /frameworks/base/core/java/android/app/SharedPreferencesImpl.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
01ed79c5786c527628544828abf8b70d02b989cd 19-Oct-2012 Christopher Tate <ctate@google.com> Document immutable requirement of SharedPreferences return objects

In particular, make it quite clear that the set returned by
getStringSet() must not be modfied by the app, period; and
add a similar caution about the map returned via getAll().

Also, fix a bug that could lead to unexpected data being committed
if the set instance passed to putStringSet() was mutated by the
app after that call (including mutations after commit() was

Bug 7312641

Change-Id: If9a1be1b0669ac879ff7a7dc67a8805548ea10cc
98e15e78934a00cf46f2be55472b7fd7a39ac0de 16-Aug-2012 Kenny Root <kroot@google.com> Use Libcore's stat instead of FileUtils#getFileStatus

Remove the last user of FileUtils#getFileStatus and move it to
Libcore.os.stat instead. Then we can remove the JNI code that does the
equivalent of a stat.

Change-Id: Ieb566a2a8a17c2dd0150724b4eb3ac1cc41c823d
2e8fb73ec088dbe459b07475aee1e43b500f101c 11-Oct-2011 Dianne Hackborn <hackbod@google.com> Fix issue #5435470: SharedPreferencesImpl should read from file...

...via BufferedInputStream

Change-Id: Ic14eff1e53b6f4a0de5f59bd97cd390eb908e3c6
4cd50b8d76e08d75df1a2e9d4902bcdc880bd1c1 02-Dec-2010 Brad Fitzpatrick <bradfitz@android.com> Make getSharedPreference() async, blocking on first access.

Bug: 3177046
Change-Id: Ibc36a1e196afd39c4f9da513a2bf4ba9e2c72177
5913630ec9686f4640a90b6872318e11fb5d9120 20-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> 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

Bug: 3211034
Change-Id: Ifa0bbb27c53a4099544950a4f822fab1fc23a47d
d3da44032084b6dd280487280553dcdbd7933e3e 10-Nov-2010 Brad Fitzpatrick <bradfitz@android.com> Move SharedPreferencesImpl out of ContextImpl.java

Change-Id: I3a58ec4c9501e906c133e841b5c5ec6bced04a02