summaryrefslogtreecommitdiff
path: root/core/java/android/preference/PreferenceManager.java
Commit message (Collapse)AuthorAgeFilesLines
* Use new UnsupportedAppUsage annotation.Artur Satayev2019-12-181-1/+1
| | | | | | | | Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library. Bug: 145132366 Test: m && diff unsupportedappusage_index.csv Change-Id: I534e3fd1305e2f4af076986770033478448a665c
* Deprecates framework Preference classesLouis Pullen-Freilich2018-11-191-0/+35
| | | | | | | | | The AndroidX Preference Library is the recommended way to build settings screens moving forward. Bug: b/114357488 Test: n/a Change-Id: I3b3bff2daf43d8239d8bf247a9c2acebbc6374eb
* Move some members to the "Q blacklist".Mathew Inwood2018-09-141-2/+3
| | | | | | | | | | | | | | Based on some analysis, these fields/methods are likely false positives. Set maxTargetSdk=P so that any apps using them are required to migrate off them in future. See the bug for more details. Exempted-From-Owner-Approval: Automatic changes to the codebase affecting only @UnsupportedAppUsage annotations, themselves added without requiring owners approval earlier. Bug: 115609023 Test: m Change-Id: I719b5c94e5b1f4fa562dd5d655953422958ad37e
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-171-0/+27
| | | | | | | | | | | | | | | | For packages: android.preference This is an automatically generated CL. See go/UnsupportedAppUsage for more details. Exempted-From-Owner-Approval: Mechanical changes to the codebase which have been approved by Android API council and announced on android-eng@ Bug: 110868826 Test: m Change-Id: I31a80552a66554d876edd01950df368c31239c2b
* Fix broken links in @see tags in framework docs.Aurimas Liutikas2018-06-011-1/+0
| | | | | | | | | | doclava was accidentally suppressing all these broken links in @see tags. This CL fixes issues so we can start enfocing checks for broken @see links. Test: make docs Exempt-From-Owner-Approval: Fixing @see javadoc link issues that are currently completely broken Change-Id: I767e9fb9842494e5eccef2a7bdeee3877c488b5d
* Small cleanup or DataStore API javadoc.Filip Pavlis2017-03-141-13/+20
| | | | | | | | | | | There is also change in PreferenceManager.getSharedPreferences. The original was not always returning null in case mPreferenceDataStore is not null. That was contradictory with the java doc and conufing during the runtime. Added tests for it. Test: Separate CTS (2) being submitted along this one, see the topic. Bug: b/34322039 Change-Id: I78a6758a674c3c8139bbe66ec17f2e29ca847828
* Improve preferences for PreferenceDataStore.Filip Pavlis2017-03-031-11/+14
| | | | | | | | | | | | | | | | | | | I have done some important cleanup of java docs where it wasn't clear enough that there is a PreferenceDataStore option. I have fixed incorrect behavior when setting default value while data store is assigned. Previsouly we looked into SharedPreferences which is incorrect. I have also changed behavior of methods getSharedPreferences and getEditor. These methods now return null when custom data store is assigned. The reason is that we definetly don't want to use SharedPreferences if data store is assigned. So the original behavior was a bit ambiguous. Also if we didn't enforce it, we would have troubles to change that in the future. Test: Tests are under the same topic. Change-Id: Ib7303bae13648767c519edba74ef9a7143e703df
* Merge "JavaDoc improvements as suggested by API council."TreeHugger Robot2017-03-021-3/+10
|\
| * JavaDoc improvements as suggested by API council.Filip Pavlis2017-03-021-3/+10
| | | | | | | | | | | | Bug: b/35813554 Test: Not needed. Change-Id: I009497bab66c9cc624f434f6d2dde0d80381d961
* | Delete @removed APIs that never shipped.Jeff Sharkey2017-02-241-12/+0
|/ | | | | | | | | These were never part of any public API level, so apps should never have been using them. Test: builds, boots Bug: 31241513 Change-Id: I4fc8f5c325da56694a5db98acc995a22d4947805
* Adds data store to provide data abstracion layer for Preferences.Filip Pavlis2016-11-291-93/+137
| | | | | | | | | Developers will be able to use PreferenceDataStore to replace default SharedPreferences to store / retrieve the data. Test: Separate CTS CL being submitted along this one, see the topic. Change-Id: Ie46a876dcb14b46b8b2584735c106c25655ec6cf
* Merge "Revert "Add Preference#onDetachedFromActivity""Jason Monk2016-04-051-8/+1
|\
| * Revert "Add Preference#onDetachedFromActivity"Jason Monk2016-04-041-8/+1
| | | | | | | | | | | | | | This reverts commit e18dc50c63110a57cfc29ec9bd21bf3f59abb6b4. Fixes: 27807793 Change-Id: Ib0384e3deb8d6376265e8e60f14490de128c9b68
* | Add methods to probe current storage state.Jeff Sharkey2016-03-271-0/+35
| | | | | | | | | | Bug: 27811575 Change-Id: I2586fe3ec4d5c98c5b956f4b4a4cec425c81b0b1
* | Update direct boot related documentation.Jeff Sharkey2016-03-171-3/+2
| | | | | | | | | | | | | | | | | | Also hide a few APIs as requested by council. Add a method to easily determine if a given File would already be encrypted at rest by the OS. Bug: 27531029 Change-Id: Icad5f1cd56411ad3ac707db85fd7449acdcc4b94
* | Refactoring FBE APIs based on council feedback.Jeff Sharkey2016-03-171-20/+43
| | | | | | | | | | | | | | | | Mostly consists of removing the word "encryption" from most APIs, since we can't actually make promises about the data being encrypted. Bug: 27531029 Change-Id: Iace9d7c4e64716abf86ed11847c40f3947e1d625
* | Make PreferenceActivity/Fragment encryption ready.Jeff Sharkey2016-01-281-3/+63
| | | | | | | | | | | | | | | | | | Developers using these classes can getPreferenceManager() and explicitly set the storage location for any SharedPreferences values persisted through it. Bug: 26747519 Change-Id: I133045df6a69aa99f33b6b6c447f52605468b927
* | APIs to obtain SharedPreferences paths.Jeff Sharkey2015-12-071-1/+7
|/ | | | | | | | | | | Needed for apps that want to migrate SharedPreferences from CE to DE storage. Note that a device will only ever enter a CE mode with a factory reset, so apps should only be using these APIs when they want to migrate files to a consistent location on non-FBE devices for simplicity. Bug: 25503089 Change-Id: Ic846215da1617d116a048e036415ac7ad523b770
* Add Preference#onDetachedFromActivityJason Monk2015-08-121-1/+8
| | | | Change-Id: I7c78f96d41b33b902e54fe1c0b7246d555aab0ed
* Add @ResourceInt annotations on APIsTor Norbye2015-02-181-2/+3
| | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* Add preferences rendering.Deepanshu Gupta2014-12-231-1/+1
| | | | | NO_SQ: Depends on updating layoutlib-api-prebuilt.jar Change-Id: Iae93ab74c478e6f2158e1528467bec9ee2d7ee9b
* VolumeZen: frameworks changes to support Settings.John Spurlock2014-05-181-2/+4
| | | | | | | | - Pull SeekBarVolumizer out into a separately reusable class. - Make register/unregisterOnActivityStopListener avail to system code. - Add new setting for displaying suppressed notifications in zen mode. Change-Id: Ic30aa575ae07650cee62c8c1d83b6bc69395cf0d
* Make public but hide OnPreferenceTreeClickListenerFabrice Di Meglio2014-01-201-1/+3
| | | | | | - needed as the Settings app is no more a PreferenceActivity Change-Id: I583493c4027b983efd059564a12eff0814c6bf02
* Expose PreferenceManager constructor / Preference#performClickJustin Koh2012-10-251-1/+4
| | | | | | | | Expose PreferenceManager constructor and Preference#performClick so they can be used by other UIs beyond the standard PreferenceActivity. Marked @hide so public API is not affected. Change-Id: Ieb4aecba5f86e40ff70f2b252458602e6b9ad1ee
* docs: add Settings dev guide;Scott Main2012-07-251-8/+28
| | | | | | a few changes to javadocs Change-Id: I2d671aafe91e4c6e224e2a556a60dce9f93f11ae
* am ca1db5ae: am dd644c17: Fallback to SharedPreferences.commit() when no ↵Brad Fitzpatrick2010-10-111-5/+20
|\ | | | | | | | | | | | | | | | | 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-5/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Fix for Ringtones not being saved when using Preference fragments.Amith Yamasani2010-09-231-6/+24
|/ | | | | | | | | | | | Bug: 2988732 RingtonePreference was calling startActivityForResult on Activity instead of on Fragment, so the result was not being delivered to the fragment. Setting a fragment owner on the PreferenceManager instance so that it can be used instead of getActivity() for launching the intent. Not exposing any new public APIs at this time.
* More SharedPreferences commit() -> apply() changes.Brad Fitzpatrick2010-09-031-2/+2
| | | | Change-Id: Ibc844d72d463434722a349f5bbc02889a9feb0ee
* Revert I3fdda2588a7c612d7c9cfb4f25d9aedd1d609162 which open two functionsOwen Lin2010-01-251-4/+1
| | | | | | in preference manager. Change-Id: I910ccd3794771da9ec1eb4809b3d1a2a6633f4b1
* Open some methods on PrefereneManager to allow others use the inflater.Owen Lin2009-09-011-2/+6
| | | | Change-Id: I3fdda2588a7c612d7c9cfb4f25d9aedd1d609162
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+799
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-799/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-9/+18
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+790