summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/SharedPreferences.java
Commit message (Collapse)AuthorAgeFilesLines
* Document immutable requirement of SharedPreferences return objectsChristopher Tate2012-10-191-1/+10
| | | | | | | | | | | | | | | 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 invoked). Bug 7312641 Change-Id: If9a1be1b0669ac879ff7a7dc67a8805548ea10cc
* docs: add developer guide cross references, Project ACRE, round 3Joe Fernandez2011-10-281-0/+6
| | | | Change-Id: I6125315ecdf0f78dd947c514a9944729d723e95d
* am ca1db5ae: am dd644c17: Fallback to SharedPreferences.commit() when no ↵Brad Fitzpatrick2010-10-111-3/+15
|\ | | | | | | | | | | | | | | | | apply() exists. Merge commit 'ca1db5ae68971779fd8af83c908128849f470ae0' * commit 'ca1db5ae68971779fd8af83c908128849f470ae0': Fallback to SharedPreferences$Editor.commit() when no apply() exists.
| * Fallback to SharedPreferences$Editor.commit() when no apply() exists.Brad Fitzpatrick2010-10-101-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Gingerbread widened the SharedPreferences.Editor interface, adding an apply() method. Most people don't implement this interface themselves, but a couple apps do. A few spots in the core framework take a SharedPreferences[.Editor] from apps, which might be a pre-Gingerbread implementation without an apply() method. This patch makes sure we never depend on the presence of an apply() method, falling back to commit() if apply() isn't available. Change-Id: I32693ac9227a60b694526a26a30234fb17a40581
* | am 734d2707: am bb660d7e: Merge "Renaming SharedPreferences.startCommit to ↵Brad Fitzpatrick2010-08-301-12/+12
|\ \ | |/ | | | | | | | | | | | | | | apply" into gingerbread Merge commit '734d270769c609c7d3a1f2ec46e1d329d9682ab4' * commit '734d270769c609c7d3a1f2ec46e1d329d9682ab4': Renaming SharedPreferences$Editor.startCommit to apply
| * Renaming SharedPreferences$Editor.startCommit to applyBrad Fitzpatrick2010-08-301-12/+12
| | | | | | | | | | | | | | | | Also removes the artifical restriction that only one apply() can be in flight at once. That was old from when I thought it'd end up being required, but wasn't. Change-Id: I3540ea8be6e0760d6a51d218186f71655c2f3f55
* | resolved conflicts for merge of 28130bae to masterBrad Fitzpatrick2010-08-271-4/+3
|\ \ | |/ | | | | Change-Id: I13df8dc12092c3d2536e12216df9130d5914380a
| * SharedPreferences$Editor.startCommit()Brad Fitzpatrick2010-08-271-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds a fire-and-forget save method (startCommit) to the SharedPreferences.Editor, which is the way most people use it anyway. This commit adds the implementation. The previous commit added the interface and docs: previous change: Idf9934b445da1fb72b79f0192218b47c0a7f5a34 git commit: edf32d01316bd3432c023f17747461b08ae36375 In addition, this change: -- adds a generic "runPendingWorkFinishers" mechanism to ActivityThread to wait on async operations that are still in flight and use it for this. -- ties runPendingWorkFinishers into Activity.onPause, BroadcastReceiver, and Service. -- makes sSharedPreferences keyed on name, not File, to avoid unnnecessary allocations -- documents and guarantees what thread OnSharedPreferenceChangeListener callbacks run on -- makes a few things in frameworks/base use startCommit(), notably Preference.java (which was ignoring the return value anyway) Change-Id: I1c8db60ad45643226fe6d246d3e513eeb7bd0ebd
* | am 49209cbc: am d0e6598b: Merge "Start of SharedPreferences.startCommit()" ↵Brad Fitzpatrick2010-08-251-2/+35
|\ \ | |/ | | | | | | | | | | | | | | into gingerbread Merge commit '49209cbcef37c4b20c9d0649ba284a51144b3930' * commit '49209cbcef37c4b20c9d0649ba284a51144b3930': Start of SharedPreferences$Editor.startCommit()
| * Start of SharedPreferences$Editor.startCommit()Brad Fitzpatrick2010-08-251-2/+35
| | | | | | | | | | | | No implementation yet, just the interface. Change-Id: Idf9934b445da1fb72b79f0192218b47c0a7f5a34
* | Added MultiSelectListPreferenceAdam Powell2010-04-151-0/+26
|/ | | | | | | | | Added set support to XmlUtils; added Set<String> functions to SharedPreferences. MultiSelectListPreference allows multiple selection and persistence of string preferences. Addresses bug 2575634. Change-Id: Icd56022d444b0ce43cccf819cd7d600fdb00e88a
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+282
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-282/+0
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+282