Commit Graph

8135 Commits

Author SHA1 Message Date
Hans Boehm
886705338b Merge "Clarify hasSelection description" am: 6bd5cf2bcc am: 0e63b9ce98
am: 8331efe0af

Change-Id: Idb4ac0cdc786ff080a998ad48fe54e803d58cc4d
2019-03-28 15:59:20 -07:00
TreeHugger Robot
9f230d5e16 Merge "Instead of duplicating test config, use imports." 2019-03-27 09:42:47 +00:00
Hans Boehm
fd7a3cf9ce Clarify hasSelection description
It's unintuitive that hasSelection() can return false, while
getSelectionStart() and getSelectionEnd() return meaningful non -1
values.

Test: TreeHugger

Change-Id: Iea2157f4b3b2c13c74547ba31eb4131496f939cc
2019-03-20 17:18:18 -07:00
Aurimas Liutikas
efab4dfa45 Instead of duplicating test config, use imports.
TEST_MAPPING allows sharing test configs, use that
to avoid duplication.

Test: atest --test-mapping frameworks/base/core/java/android/widget
Change-Id: I441f36fabcc26bc8198ab49eebc433932b344ae7
2019-03-20 15:39:23 -07:00
TreeHugger Robot
100bb0e692 Merge "[Magnifier-80] Make API getters relative to window" 2019-03-20 18:20:36 +00:00
TreeHugger Robot
fe31bc77ec Merge "Start running small widget test for widget changes." 2019-03-20 16:35:31 +00:00
Mihai Popa
ef456970fe [Magnifier-80] Make API getters relative to window
The CL updates Magnifier#getPosition() and Magnifier#getSourcePosition()
to return coordinates relative to the main application window, rather
than relative to the surface backing it. Working with window relative
coordinates is the better approach for public APIs. The CL also makes
View#getLocationInSurface public. Magnifier CTS tests still need it,
when testing MAX_IN_SURFACE behavior.

Bug: 124012182
Test: atest CtsWidgetTestCases:android.widget.cts.MagnifierTest
Change-Id: I684f27aa466e0390c7801b616331f4682784c423
2019-03-20 16:08:46 +00:00
Aurimas Liutikas
d33a7ce8d4 Start running small widget test for widget changes.
Test: None
Change-Id: I94fb55df43bfbeda1549ef5827c55e224eb0e1b5
2019-03-19 09:29:37 -07:00
Ashley Rose
73abdd3c59 Rename @EnumEntry and @FlagEntry
Test: atest CtsViewInspectorAnnotationProcessorTestCases
Bug: 127531820
Exempt-From-Owner-Approval: Annotation-only change
Change-Id: Id293e2b2ac9cf7bf2aaeb28645471ea227bb587b
2019-03-18 16:05:55 -04:00
Matvei Malkov
7177265e9c Revert deletion and deprecate few PopupWindow methods
After method rename procedure b/126354063 we discovered that
androidx-platform-dev already depends on that methods added during fixit
week, so revert deletion of these methods and deprecate them.

Bug: b/126354063
Test: PopupWindowTests
Change-Id: I17b985542ffd661358059740bdf620e1bfb5b550
2019-03-14 16:16:38 +00:00
TreeHugger Robot
8edccc5d60 Merge "Addressing API review comments for AutoCompleteTextView Bug: 126376225 Test: Ran android.widget.cts.AutoCompleteTextViewTest" 2019-03-13 19:10:42 +00:00
Ralston Da Silva
f954e23bab Addressing API review comments for AutoCompleteTextView
Bug: 126376225
Test: Ran android.widget.cts.AutoCompleteTextViewTest

Change-Id: I3c665debb29a82075a39ddaef493dea288f0507c
2019-03-12 16:22:59 -07:00
Matvei Malkov
25c9ac3f5b Rename methods for PopupWindow
This CL renames 4 methods for PopupWindow based on API council
suggestions. Also remove unused import in order to `repo upload`

Bug: b/126354063
Test: All ListPopupWindow, MenuPopup and PopupWindow passed
Change-Id: I5db93b1c18a7a3dc9033cb9c5bbe89107ac22024
2019-03-12 17:12:44 +00:00
Ashley Rose
a0fda08403 Merge "Custom inspection companion for RelativeLayout" 2019-03-12 16:57:10 +00:00
Xin Li
3e112d56a4 DO NOT MERGE - Merge PPRL.190305.001 into master
Bug: 127812889
Change-Id: I7c5ada5c5afe38848be733616cbb1568440ab1c5
2019-03-12 00:17:37 -07:00
Clara Bayarri
596a6edd0f Fix Annotations
API Council feedback

Bug: 126700367
Bug: 121324653
Test: none
Change-Id: I8263f60a0fa75a6261d174d33de20c675a2a608e
2019-03-11 14:10:44 +00:00
cnx421
27004a3362 Merge "fix 'int android.view.View.getHeight()' on a null object reference" am: 4add708b91 am: 6a5d589a50
am: 3069e2ba6f

Change-Id: I9ba21d8d6aee9424ffad3fbe2072ef78e3b54455
2019-03-09 04:13:43 -08:00
Ashley Rose
621c0af44b Custom inspection companion for RelativeLayout
Test: atest StaticInspectionCompanionProviderTest
Bug: 126913705
Change-Id: I2f4d5ccf38b77af9d1a4c21318475baec44e9a1c
2019-03-08 18:29:14 -05:00
cnx421
6a5d589a50 Merge "fix 'int android.view.View.getHeight()' on a null object reference"
am: 4add708b91

Change-Id: I3aa9c2da09a1447f79edb6a228f88cdc731bd605
2019-03-08 06:38:44 -08:00
Treehugger Robot
4add708b91 Merge "fix 'int android.view.View.getHeight()' on a null object reference" 2019-03-08 00:19:39 +00:00
Ashley Rose
0be2720c5b Merge "Add @InspectableProperty annotations to LayoutParams" 2019-03-06 18:38:18 +00:00
TreeHugger Robot
1d4059d217 Merge "[Magnifier-79] Make Magnifier#Builder final" 2019-03-05 23:42:21 +00:00
Mihai Popa
53fd6965d2 [Magnifier-79] Make Magnifier#Builder final
Bug: 126699623
Test: none
Change-Id: I7a406fe5ffc79df2fc33e8bc1e9bc506798e9709
2019-03-05 20:47:10 +00:00
TreeHugger Robot
3b913d7a52 Merge "Add nullability to ScrollView#scrollToDescendant." 2019-03-05 18:13:48 +00:00
Siyamed Sinir
f408f3620c Add NonNull annotation to getTextDirectionHeuristics
Test: None
Bug: 126700617
Change-Id: Idaf5cc0237cd82c5d317a66d9e22fe7d2ac41f3d
2019-03-04 14:35:57 -08:00
Ashley Rose
de3b4a78cd Add @InspectableProperty annotations to LayoutParams
Change-Id: I69eb71bec8bbf36564e178a3ddf4be9e00e2d531
Fix: 126913705
Test: m framework
2019-03-04 16:46:15 -05:00
Aurimas Liutikas
cc879eed48 Add nullability to ScrollView#scrollToDescendant.
Bug: 126180253
Test: make update-api
Change-Id: I7ee92ad8fb6ab2b0519ad2a21b8850fa130b6531
2019-03-01 16:18:21 -08:00
Sunny Goyal
40635d7091 Adding some missing annotations as per API review
Bug: 126702868
Bug: 126699296
Test: N/A
Change-Id: Iedfec694e30c77e0190842542e4e38641306cda5
2019-03-01 11:55:26 -08:00
Ashley Rose
645d54052a Merge "Improve widget getters" 2019-03-01 18:43:00 +00:00
Jeff Sharkey
9e8f83db6d All Parcelable CREATOR fields are @NonNull.
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
2019-02-28 23:29:04 -07:00
Ashley Rose
433cb1d475 Improve widget getters
Add range annotations to ToggleButton#getDisableAlpha() and
ViewFlipper#getFlipInterval().

Rename AbsListView#getDrawSelectorOnTop() to #isDrawSelectorOnTop()

Test: m framework
Change-Id: Ieda5b45d10677a9be19a4fc61e8e25d491633428
Fix: 126391791
2019-02-28 18:41:26 -05:00
Aurimas Liutikas
f3fb34ce56 Deprecate ZoomControls.
In API 26 we deprecated ZoomButton and ZoomButtonsController, but
we missed ZoomControls that is used together with the former classes.

Test: None
Bug: 126610647
Change-Id: I0207551b2aaf511ad37ad759475916616fe9240b
2019-02-27 16:52:33 -08:00
Louis Pullen-Freilich
16052222a0 Merge "Dark-greylists fill() methods in ListView and GridView" 2019-02-27 01:50:49 +00:00
TreeHugger Robot
4f12e60027 Merge "[Magnifier-78] Fix shadow on first draw" 2019-02-26 21:28:28 +00:00
Mihai Popa
6bf0b2f656 [Magnifier-78] Fix shadow on first draw
The CL fixes the light source position when the magnifier is first
drawn. Before this CL, the source position was set only after the
magnifier was drawn for the first time, causing an incorrect shadow for
the first draw. This was noticeable if the magnifier was trigerred and
not moved (the shadow was updated and started looking fine when the
magnifier was moved and a new draw happened).

Bug: none
Test: manual testing
Change-Id: Iabdd34430a5def3608197294cf694c5045a7d8d3
2019-02-26 18:01:37 +00:00
John Reck
e57475e6c9 Address API council feedback
Bug: 125027187
Bug: 125026102
Bug: 125026678
Bug: 125026234
Bug: 125027586
Bug: 125026476
Bug: 125026103
Bug: 125026237
Bug: 125027248
Bug: 125026475
Bug: 125027487
Test: RenderNodeTests
Change-Id: Ic63ea7a3cfe359a7dff0c1b46e534e499f7e928b
2019-02-22 14:24:28 -08:00
Tarandeep Singh
e44c11934b Merge "Override checkInputConnectionProxy in SearchView." 2019-02-19 19:23:04 +00:00
cnx421
26c15a1126 fix 'int android.view.View.getHeight()' on a null object reference
This CL fixes a bug in AbsListView when it move offset,but its ChildCount was zero and the firstChild
view was null object reference

Bug: N/A

Change-Id: I1c9ccd9807201fd107fe14e051f3f8e7b0cc530d
Signed-off-by: cnx421 <cnx421@gmail.com>
2019-02-18 14:36:03 +08:00
TreeHugger Robot
3661808cb7 Merge "Restrict reflection access to Toast's TransientNotification." 2019-02-15 21:15:51 +00:00
Shep Shapard
156ac1d73d Merge "Removing reflection access ProgressBar#mDuration" 2019-02-15 16:55:35 +00:00
shepshapard
3b07045a3f Removing reflection access ProgressBar#mDuration
For the following reasons:
1. Developers can set this via XML
2. Using this value is inferior to setting an
indeterminate drawable that implements Animatable.

Fixes: 124052713
Test: No new implementation, so no tests.

Change-Id: Ie1e23f75328cce5d8f4d317625d8f38c0a166352
2019-02-14 14:08:58 -08:00
Tarandeep Singh
af91ab710d Override checkInputConnectionProxy in SearchView.
SearchView's editor is SearchView#SearchAutoComplete. In order to
correctly determine if SearchView's inner editor has the current
InputConnection, SearchView#SearchAutoComplete must override
check InputConnectionProxy to return true.
Note: this change will also be cherrypicked to jetpack

Bug: 112399521
Test: Manually tested using steps mentioned in bug.
Change-Id: If4d202d0070974cbda4cb3c78febe3049001972b
2019-02-14 13:43:25 -08:00
Ralston Da Silva
17d7ce6e4a Removing hidden api usage from AutoCompleteTextView
ensureImeVisible() was added to show the keyboard in SearchDialog go/ensureImeVisible-added. A better fix would be to expose a function to setInputMethodMode(), as showDropDown() is public and can be called externally. Adding this new API in this CL.

Bug: 123768913

Test: Added tests to android.widget.AutoCompleteTextViewTest.

Change-Id: I07e53c6d5e93d1e33381f8f87f75a7dee2f2f5a5
2019-02-14 11:02:23 -08:00
Xin Li
0e71b4f19b DO NOT MERGE - Merge pi-platform-release (PPRL.190205.001) into
stage-aosp-master

Bug: 124234733
Change-Id: Ic4f67fde0835da0b1c363906cccef0d244e38393
2019-02-14 09:48:06 -08:00
Nader Jawad
9b31762790 Merge "Added public API alternatives to reflective calls on ScrollBarDrawable" 2019-02-13 17:55:48 +00:00
Yigit Boyar
0d305f224c Restrict usage of mSelectorPosition and mSelectorRect
These two fields were accessed via reflection by certain apps but
they are not really designed to be public API.

Moreover, these usages seem to come from an open source project
and I've created an issue there to notify the owners.

https://github.com/emilsjolander/StickyListHeaders/issues/497

Bug: 123768403
Bug: 123769365
Test: existing tests pass
Change-Id: I7d6beba8ea7e9b9a406ea2332bcccfd283db8196
2019-02-12 23:41:17 +00:00
TreeHugger Robot
a057c94bc5 Merge "Revert "[Magnifier-77] Show it on long press selection"" 2019-02-12 23:04:28 +00:00
Nader Jawad
93aeba8c52 Added public API alternatives to reflective calls on ScrollBarDrawable
Added public setter/getter APIs on View to set/get the track/thumb
Drawables for the vertical and horizontal scroll bars to support
configuring scrollbars programmatically in addition to xml
attributes

Change-Id: Ic0b42742e8a795fe616887369dd0e592cde5c2fa
Fixes: 123769505
Test: Added View.java test cases to verify new setter/getters
2019-02-12 14:31:49 -08:00
TreeHugger Robot
f518983925 Merge "Restrict reflection access to NumberPickers's mSelectionWheelPaint" 2019-02-12 17:39:08 +00:00
Mihai Popa
26ee00dd57 Revert "[Magnifier-77] Show it on long press selection"
This reverts commit 88fbed49af.

Reason for revert: We decided to punt this functionality to R, in order to keep consistency with WebView and Chrome. (b/119819194)

Change-Id: I625a8bca52687e3f15957f4dc4a0982c1ad28a2a
2019-02-12 13:57:47 +00:00