summaryrefslogtreecommitdiff
path: root/core/java/android/preference/PreferenceFragment.java
Commit message (Collapse)AuthorAgeFilesLines
* Migrate frameworks/base javadocs references to androidxAlan Viverette2022-02-091-1/+1
| | | | | | | | | | | Does not remove Support Library artifacts from docs classpath (ApiDocs.bp) because they are still used in development/samples, which is not as easy to migrate as javadoc. Bug: 158779503 Test: make docs Exempt-From-Owner-Approval: Mass find/replace for androidx migration Change-Id: Icf7f53ec36a0e970413352e2ebf40ce9d60ed17e
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-291-1/+2
| | | | | | | | | | | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. This is a resubmit of ag/12929664 with some APIs excluded that caused test failures; see bugs 171886397, 171888296, 171864568. APIs excluded: Landroid/bluetooth/le/ScanRecord;->parseFromBytes([B)Landroid/bluetooth/le/ScanRecord; Landroid/os/Process;->myPpid()I Landroid/os/SharedMemory;->getFd()I Landroid/hardware/input/InputManager;->INJECT_INPUT_EVENT_MODE_WAIT_FOR_FINISH:I Bug: 170729553 Test: Treehugger Change-Id: I8285daa8530260251ecad6f3f38f98e263629ca7
* Revert "Add maxTargetSdk restriction to unused APIs."Hongwei Wang2020-10-281-2/+1
| | | | | | | | | This reverts commit 72f07d6a8a32db4a0dedd7682a0b3385be2b9cd6. Reason for revert: Droidcop-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?testMethod=testAppZygotePreload&testClass=android.app.cts.ServiceTest&atpConfigName=suite%2Ftest-mapping-presubmit-retry_cloud-tf&testModule=CtsAppTestCases&fkbb=6936597&lkbb=6936969&lkgb=6936551&testResults=true&branch=git_master&target=cf_x86_phone-userdebug>, bug b/171886397 Bug: 171886397 Change-Id: Ibe0f0430a3451477c1ee8ef56a596e91ea1e7672
* Add maxTargetSdk restriction to unused APIs.Mathew Inwood2020-10-271-1/+2
| | | | | | | | | | These are APIs that have @UnsupportedAppUsage but for which we don't have any evidence of them currently being used, so should be safe to remove from the unsupported list. Bug: 170729553 Test: Treehugger Change-Id: I4c8fd0006f950de9955242e93968fb0996ceb372
* 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-16/+5
| | | | | | | | | The AndroidX Preference Library is the recommended way to build settings screens moving forward. Bug: b/114357488 Test: n/a Change-Id: I3b3bff2daf43d8239d8bf247a9c2acebbc6374eb
* Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-171-0/+3
| | | | | | | | | | | | | | | | 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
* Deprecate framework Fragments and LoadersIan Lake2017-11-131-1/+7
| | | | | | | | | | | | Redirect developers to use the Support Library versions of Fragments and Loaders to ensure that they get consistent behavior across versions of Android and all devices as well as access to Lifecycle improvements. Test: Confirmed APIs deprecated in current.txt BUG: 68381801 Change-Id: I58ec599e557fc93c8547c45ba7c9ced96b0c8616
* Add titles to PreferenceFragments and PreferenceScreens for watches.Michael Kwan2016-07-261-0/+16
| | | | | | | | | | Preferences lack a title on watch type devices due to lack of ActionBar support. A custom ListView was added to use a custom wrapper adapter to add a persistent header view at the top of the ListView that developers would not be able to remove via the ListView API. Bug: 27962897 Change-Id: I6bccecf85592d9507e0c7a04c9a035617001e9ef
* Allow preference theming to remove divider.Michael Kwan2016-07-021-6/+4
| | | | | Bug: 27962897 Change-Id: I6632f2a3c3d1290c472594f127ad33c9b85023f1
* Let support preferences use DeviceDefault themesJason Monk2015-11-121-1/+23
| | | | Change-Id: I5a0f074dfd1b948b1ced9195ae937e2ad80a5f28
* Merge "Reset the setOnKeyListener callback when view is destroyed"Alan Viverette2015-10-071-0/+3
|\
| * Reset the setOnKeyListener callback when view is destroyedMykola Kondratenko2015-07-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NPE happened in mListOnKeyListener.onKey(). It looks like onKey in some cases is sent to a view while beeing destroyed. When callback is received mList is referenced causing the NPE. Remove OnKeyListener first when destroying view so we can not get any unwanted key callbacks. Bug: 22333421 Change-Id: I94b198e31a2f9fbdd7fbadf4971be7720dcfad8d
* | Add resource type annotations to some APIsTor Norbye2015-03-131-1/+2
| | | | | | | | Change-Id: I37c8afdaea455aa92bc8270bb2dfd60616c5f9bc
* | Add some more @Nullable annotationsScott Kennedy2015-02-221-4/+5
|/ | | | Change-Id: I586d542e087eafa8355f0eaa606d66876c0f5a56
* Fix bug #16957601 Stability: ISE in Settings: Observer com.android.settings.Fabrice Di Meglio2014-08-141-0/+5
| | | | | | | | | SettingsPreferenceFragment$1@273c8fdb was not registered - add onUnbindPreferences() call to match onBindPreferences() - this new method is @hide so it does not impact the APIs Change-Id: Iee0ab8a4ecc2046f89fb96cc52af150e835f658c
* Add PreferenceFragment stylingFabrice Di Meglio2014-07-071-2/+15
| | | | | | - add the capability to specify a specific layout for PreferenceFragment Change-Id: I2fa36b8fa8110e6cbc8006e1d000dc90ae6a5f0b
* Improve Preference highlightingFabrice Di Meglio2014-04-171-0/+5
| | | | | | | | | - add PreferenceFragment.onBindPreferences() so that we can know when the binding as been done - use the Preference's key as a tag for its View (so that we can locate it latter in the View hierarchy) Change-Id: Ifb3b30e576048b7464af63643834d278a46a8543
* Add Preference highlightingFabrice Di Meglio2014-04-161-0/+20
| | | | | | | | - use a specific drawable for highlighting a Preference at a given position - also add PreferenceFragment.hasListView() as hidden API Change-Id: If69854cf6c4852d0f45e2c3a9734b1f63b352f9d
* docs: add links to new Settings dev guideScott Main2012-07-261-0/+7
| | | | Change-Id: I04444ec0c4c1c278569b64f15cbbc7e8c1c623cd
* Preferences padding and scrollbars to match spec.Jeff Sharkey2011-08-171-1/+0
| | | | | | | | Adjust preferences ListView to use direct padding instead of applying to outer parent. Also display scrollbars outsideOverlay on small screens. Change-Id: I750c53d2452d8842d487a091075c32f009f2c2fc
* Inline SeekBarPreferenceJohn Reck2011-06-161-1/+18
| | | | | | | Dialog-based SeekBarPreference renamed to SeekBarDialogPreference New inline SeekBarPreference added Change-Id: I7a5d8f7aa554c4af4086a9bcc74cf07879c8523c
* am 2bcd9c6e: am eb5e633a: am 608a200d: Merge "Stability fixes for ↵Amith Yamasani2011-06-141-2/+7
|\ | | | | | | | | | | | | PreferenceFragments." into honeycomb-mr2 * commit '2bcd9c6e7b4fe6c465811e9b8ac48acec23cb341': Stability fixes for PreferenceFragments.
| * Stability fixes for PreferenceFragments.Amith Yamasani2011-06-141-2/+7
| | | | | | | | | | | | | | | | | | | | | | Unregister the click listener as early as possible, so that clicks don't get delivered after the activity is detached. Bug: 4599586 This should also fix: 4603030, 4601105, 4598715, 4598712. Change-Id: I7bcff719bed14ea61b482bd6d29ae1fa5e322e41
* | Manual merge. Preference activity changes to work on smaller tablet screens ↵Amith Yamasani2011-05-261-8/+2
| | | | | | | | | | | | | | | | | | and phones. Padding around fragments and to the left of preference items adjusted for different display sizes. Change-Id: I2d29e5525c381092a3f1d2fb1265ce07db893d78
* | More work on making prefs work well on small screens.Dianne Hackborn2011-03-181-2/+9
|/ | | | | | | Tweak padding so layouts now look decent, a few extensions so that the correct title can be shown. Change-Id: Ieace16bf4962d66564c6e2f67fb588e582943850
* Fix a race condition when entering and exiting a preference fragment quickly.Amith Yamasani2011-03-021-0/+1
| | | | | | | | | | Bug: 3413715 Fragment was going through STARTED/RESUMED/STARTED/CREATED very quickly and bindPreferences() was a delayed call that happened after mView was nullified. Removing the MSG_BIND_PREFERENCES when view is destroyed. Change-Id: Iec43102c004a266c412b993f17e1a8c1699fb0b1
* Remove the OnItemClick listener when the fragment is destroyed.Amith Yamasani2010-12-091-0/+1
| | | | | | Bug: 3228510 This probably fixes a lot of other monkey bugs in Settings.
* Fix sub-header height to follow drawable. Floating panels for Preference ↵Amith Yamasani2010-10-271-1/+1
| | | | screens.
* Fix for Ringtones not being saved when using Preference fragments.Amith Yamasani2010-09-231-0/+1
| | | | | | | | | | | | 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.
* Some fragment stuff:Dianne Hackborn2010-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Fix issue #2975886: Make getTargetFragment() survive rotation events with retained fragments. We now fix up the fragment pointer when restoring state. Fix issue #2919928: In PreferenceFragment, addPreferencesFromResources() is not effective when called after onActivityCreated(). Note to self: do not use a what code of 0. Maybe that should be documented (I'll do it in gingerbread). Hopefully implement #2992753: DialogFragment.dismiss will NPE if called too soon (before attached to activity). We now keep track of the FragmentManager separately from the activity, and set that as soon as the fragment is part of a transaction. Investigate issue #2988876: NPE when device orientation is changed. The NPE is because of the app trying to do a fragment transaction in onPause(). This is fundamentally not viable, since (a) the activity will be gone before we ever have a chance to process the message to commit the transaction, and (b) even if we did try to commit the transaction earlier, this would be done after onSaveInstanceState() and thus not work in cases where the activity gets killed in the background. So instead, we'll just throw an immediate exception if you try to do this. Change-Id: Iea62b50eb79f066af2471fce86836d073398f4f7
* Make getListView() public and hidden, as it is needed for WifiSettings.Amith Yamasani2010-08-171-1/+2
|
* Add facility to switch to new fragments from preferences.Dianne Hackborn2010-08-031-1/+29
| | | | Change-Id: I009315b59cf81b4962e9c5a4490f0f82743ed64a
* New two-pane mode for PreferenceActivity.Dianne Hackborn2010-08-031-11/+19
| | | | | | | | This introduces a whole new way to use PreferenceActivity, as a container for PreferenceFragments that the user can switch between from a list of headers. Change-Id: I1c79b7c78b86790dc460a1414a999aba5de80628
* Add PreferenceFragment.Dianne Hackborn2010-07-281-0/+309
Change-Id: I9b87ec2c15822cca5b460a9a2d589fc24e21a789