summaryrefslogtreecommitdiff
path: root/core/java/android/preference/DialogPreference.java
Commit message (Collapse)AuthorAgeFilesLines
* Fix showing keyboard without editor focused in some cases (2/2)Ming-Shin Lu2020-08-221-23/+0
| | | | | | | | | | | | | | | | | | As CL[1] mentioned issue symptom, we also need to remove STATE_ALWAYS_VISIBLE in EditTextPreference and using new WindowInsets API to show soft-keyboard, to prevent the keyboard may be shown without focusing editor case. [1]: I37ae6e30d1de581ba15131c2a90396b3a522a4d6 Fix: 165910518 Test: atest CtsInputMethodTestCases Test: manual as issue steps 1. Enter Dialer-> Menu -> Settings-> calling accounts -> Fixed Dialing Numbers 2. Tap change pin2 code, input old pin2 -> pressing ok button 3. Check if password keyboard shown Change-Id: I763838fb7b887e09b46b1fb2360a515b77de8dd4
* 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
* Merge "Add Nullable annotation to getDecorView" am: a018254b45 am: b812cec859Siarhei Vishniakou2019-03-131-0/+2
|\ | | | | | | | | | | am: 7f0cff2673 Change-Id: I7c607c47d057d08abf3c8dad30cf26a9dfba0caa
| * Add Nullable annotation to getDecorViewSiarhei Vishniakou2019-03-071-0/+2
| | | | | | | | | | | | | | | | | | Since getDecorView may return null when dialog's window is no longer present, annotate it as @Nullable. Bug: 124327419 Test: none Change-Id: I0d49b75b14f54cd8ba8304c900f6c8625f889aa8
* | Merge "Add a null check for getWindow()" am: 3c69948e6a am: 71f52a6a0dSiarhei Vishniakou2019-03-081-5/+20
|\| | | | | | | | | | | am: bee3e01c9b Change-Id: Iee9698396354eb0e0cacff759cc0dcef621ff514
| * Add a null check for getWindow()Siarhei Vishniakou2019-03-061-5/+20
| | | | | | | | | | | | | | | | | | | | Protect against crash surfaced by monkey, where it seems that the window of the dialog is no longer present. If not present, don't need to post dismiss runnable. Bug: 124327419 Test: adb shell monkey -p com.google.android.GoogleCamera -s 999 -v 20000 Change-Id: Ic03b8501bb73725e04544fcb2397532be531988e
| * Dismiss Dialog in post instead of immediatelySiarhei Vishniakou2018-08-201-50/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When ViewGroup is dispatching touch events to children, it can happen that a child, upon receiving a touch event, may decide to close the window. In this case, dispatchDetachedFromWindow will be called, which would invalidate (=recycle) the TouchTargets. As the ViewGroup would continue dispatching the event to other children, those TouchTargets would already no longer be valid. This could cause an NPE. In one particular example, there could be several views in a Dialog, and one of the views would dismiss the Dialog in a click handler. Since the click handler executes events immediately, this makes ViewGroup.dispatchTouchEvent recurse on itself, and modify the internal state. This would later cause the NPE. Calling dismiss in a message avoids this issue by letting the event handling finish before dispatching dispatchDetachedFromWindow, which would cause another ACTION_CANCEL to be sent to the view. Bug: 26611563 Test: created a sample app and recorded a sequence of touch events using inputstudio in order to reproduce the crash. The repro rate was 100%. Could no longer repro with this change. Change-Id: Ia1d8070152c7ba2d14cddebcc5844994fe3ab5da Merged-In: Ia1d8070152c7ba2d14cddebcc5844994fe3ab5da
| * Add @UnsupportedAppUsage annotationsMathew Inwood2018-08-171-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: I6a39e2a1e1eb65cde9d200fb794c6592982f1272 Merged-In: I31a80552a66554d876edd01950df368c31239c2b
* | All Parcelable CREATOR fields are @NonNull.Jeff Sharkey2019-02-281-1/+1
| | | | | | | | | | | | | | | | | | If they were null, then the Parcelable would fail to work. Bug: 126726802 Test: manual Change-Id: I7929ffa2f20e5de1c8e68e8263cca99496e9d014 Exempt-From-Owner-Approval: Trivial API annotations
* | 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/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Dismiss Dialog in post instead of immediatelySiarhei Vishniakou2018-04-041-50/+78
|/ | | | | | | | | | | | | | | | | | | | | | | | | | When ViewGroup is dispatching touch events to children, it can happen that a child, upon receiving a touch event, may decide to close the window. In this case, dispatchDetachedFromWindow will be called, which would invalidate (=recycle) the TouchTargets. As the ViewGroup would continue dispatching the event to other children, those TouchTargets would already no longer be valid. This could cause an NPE. In one particular example, there could be several views in a Dialog, and one of the views would dismiss the Dialog in a click handler. Since the click handler executes events immediately, this makes ViewGroup.dispatchTouchEvent recurse on itself, and modify the internal state. This would later cause the NPE. Calling dismiss in a message avoids this issue by letting the event handling finish before dispatching dispatchDetachedFromWindow, which would cause another ACTION_CANCEL to be sent to the view. Bug: 26611563 Test: created a sample app and recorded a sequence of touch events using inputstudio in order to reproduce the crash. The repro rate was 100%. Could no longer repro with this change. Change-Id: Ia1d8070152c7ba2d14cddebcc5844994fe3ab5da
* Annotate methods to be called from overrides with @CallSuperTor Norbye2015-03-071-0/+2
| | | | Change-Id: Ibc587c2aaee9f3e7f448079f72a75459fe4e15e7
* Add @ResourceInt annotations on APIsTor Norbye2015-02-181-3/+5
| | | | Change-Id: I119cc059c2f8bd98fd585fc84ac2b1b7d5892a08
* Add APIs for obtaining themed Drawable from Theme, ContextAlan Viverette2014-02-031-1/+1
| | | | | BUG: 12611005 Change-Id: Ic0057be4e4c2d0c61ce02a019b3f7d0625e3a016
* Fix default style attr in DialogPreference subclass constructorsAlan Viverette2013-09-161-6/+9
| | | | | BUG: 10751709 Change-Id: Ia7fa91e52881b46d39711d2adc43330014234a55
* Add View constructor that supplies a default style resourceAlan Viverette2013-09-091-5/+10
| | | | | | | Also updates the constructor of every class that extends View. BUG: 10676369 Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
* Avoid launching dialogs twice from double-clicking a preference.Amith Yamasani2012-05-161-0/+2
| | | | | | | | Bug: 6500628 Only create the dialog if another one doesn't already exist. Change-Id: Ie9be06a58c369299bcb67526e668785e6735a307
* Fix bug 5067075 - missing scrollbar when entering long signaturesAdam Powell2011-08-281-2/+1
| | | | | | | Let DialogPreferences decide their own IME adjust mode as normal rather than forcing adjustPan. Change-Id: Ib53e9f648342430640469a0682308b056e7ef991
* Fix bug 3245210 - Bad window style for action modes for light holo dialog themeAdam Powell2010-12-051-2/+1
| | | | | | Also fixed some issues with the overlay action mode window styles. Change-Id: Ie4cf43f6ccf720ef0090ca8bd667fb6d78152f93
* Adding pan behavior on preference dialog.Peter Eliasson2010-10-251-1/+1
| | | | | | | | Changed the preference dialog with text input to pan if the display area is limited. This helps the user to see the input better. Change-Id: I12341546f6f82601ac5a2746153255a9b2d49a1c
* Removed Calls to deprecated APIsChristian Mehlmauer2010-05-171-2/+1
| | | | Change-Id: I3f9b6a8d3c8a050156a6cc7ea0eb9de33b82f79a
* Show keyboard automatically in EditTextPreference dialogsAmith Yamasani2009-09-161-1/+26
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-0/+454
|
* auto import from //depot/cupcake/@135843The Android Open Source Project2009-03-031-454/+0
|
* Code drop from //branches/cupcake/...@124589The Android Open Source Project2008-12-171-2/+11
|
* Initial ContributionThe Android Open Source Project2008-10-211-0/+445