summaryrefslogtreecommitdiff
path: root/core/java/android/preference/SwitchPreference.java
Commit message (Collapse)AuthorAgeFilesLines
* 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-0/+7
| | | | | | | | | 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/+2
| | | | | | | | | | | | | | | | 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
* Let support preferences use DeviceDefault themesJason Monk2015-11-121-1/+1
| | | | Change-Id: I5a0f074dfd1b948b1ced9195ae937e2ad80a5f28
* Add @ResourceInt annotations on APIsTor Norbye2015-02-181-2/+3
| | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* Fix accessibility events emitted from TwoStatePreferenceAlan Viverette2014-09-021-2/+0
| | | | | | | | | | Removes redundant and conflicting events emitted from check and switch preferences. Sends VIEW_CLICKED accessibility events from AdapterView rows after calling their on click listeners, which ensures data is consistent. BUG: 16961152 Change-Id: I4b57bceec6830d775c2da57226b8ee482242caf7
* Remove old listener when rebinding SwitchPreferenceAlan Viverette2014-07-111-1/+7
| | | | | | | | | Also fixes switch animation during scrolling, unnecessary call to requestLayout() on drawable invalidate, and potential NPE. BUG: 16225972 BUG: 4312303 Change-Id: I015d1f03206dd2c812592b0abfa4214a3de73d3f
* Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-4/+23
| | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* Fix bug 5205275 - SwitchPreference doesn't allow Switch to slide backAdam Powell2011-08-231-12/+8
| | | | | | | | | | | and forth. Also have the SwitchPreference's Switch widget's onClick listener toggle the switch rather than invoke the preference's own onClick method. This will allow subclasses to assign different behavior to clicking the preference itself if desired. Change-Id: I97e3b7a786e9f0e8bdc03c0ed6001caa7dcd991b
* Improving accessibility feedback for two state widgets.Svetoslav Ganov2011-07-291-2/+2
| | | | | | | | | | | | 1. Added population of sensible text for the state of the two state controls such as CheckBox, Switch, etc. This is important since if they are in a layout manager which fires an accessibility event there should be a description of the widget. bug:5092552 Change-Id: Ie3ca955653563496b84db379ae23a23fe88089a8
* TwoStatePreference does not fire click events.Svetoslav Ganov2011-07-221-2/+2
| | | | | | | | | | | | | 1. Event were send in onBindView but since we have fixed the bug of unattached views firing accessibility events and there is no guarantee that the view is attached in onBindView no events were sent. Now posting a runnable so on the next run the UI tread will send the event i.e. after the view is bound and attached. bug:5008841 Change-Id: I4ed914f7fb65d6896f0c55e7c46e6508d2b2f11f
* Add SwitchPreferenceAdam Powell2011-06-081-0/+180
Change-Id: I073e9bfba8c4e1a625c27f976f71ea56a81ba20f