Also fixed some getAutoFillType() implementations to return null
when the view is disabled.
Bug: 33550221
Bug: 35840787
Test: CtsAutoFillServiceTestCases (with new tests) pass
Test: m update-api
Change-Id: I46acc1fb106cf2153515cc1c9567b34cfabd1c62
Support for smart text share in a11y mode needs to be done differently.
See: b/34779222
Test: Manually tested
Bug: 35252502
Change-Id: Ia268065c21fc5ac716ca06a0ec9d3866fbd13aa4
Removes all explicit casts from android.widget classes. Also @removes
methods on ListView that were overriding @hidden methods and should
never have been exposed as public API.
Bug: 24137209
Test: make
Change-Id: I89f0e51258560987b3942251fd249210f825ac2a
* public attr "autoSizeText" becomes "autoSizeTextType"
(inlined with all other methods and naming)
* documentation for autoSizetextType "uniform" re-worked:
"The TextView scales text size both horizontally and
vertically to fit within the container"
* converted comments into Javadoc for
TextView#AUTO_SIZE_TEXT_TYPE_NONE and
TextView#AUTO_SIZE_TEXT_TYPE_UNIFORM
* better documented attr "autoSizePresetSizes" to specify
it is a resource array of dimensions
* various small fixes in comments
Bug: 35755149
Bug: 35763485
Bug: 35764658
Bug: 32221168
Test: run cts-dev -m CtsWidgetTestCases -t \
android.widget.cts.TextViewTest
Change-Id: I36afd399e005521b6e85922aa9e1e4418bb960e1
The UX for smart selection specifies that the user is able to reset
the original selection by tapping once on the word after smart
selection. Tap once, and the selection resets to the word that was
initially selected (before smart selection happened), tap one more
time and the insertion cursor appears as usual. If the user taps
a different word other than the original selection, the insertion
cursor appears as before.
Test: I7456eb4773d40366a3f4aa7bf051a1c7ddda6e9d
Bug: 34777048
Change-Id: If73259ddb67379d5a5deaa01b840b5185cedf4c8
Set AM/PM mode before setting hour in TextInputTimePickerView. This is
needed so we know exactly which it is when we are using 12 hour clock.
Not setting it early was causing TextInputTimePickerView to update TimePicker
with the hour that was not offset correctly based on AM/PM state.
Test: existing tests caught this - TimePickerTest#testKeyboardInputModeClockAmPm
verified locally that this test now passes.
Bug: 35262830
Change-Id: I7e912320cb5a72c5d9d4e80dc0b42deb651f2636
Spinner is a special kind of list-value field because its auto-fillable
values are not currently present in the assist structure: this change
adds a getAutoFillOptions() to fill that void, and implements the
auto-fill APIs on Spinner.
It also fixes RadioGroup.getAutoFillValue() - it should return the index
of the child, not its resource id.
Bug: 33550221
Test: CtsAutoFillServiceTestCases (with new tests) pass
Change-Id: I625e7dd705fade56fda490fcd3c4446c0c245ee1
Add API for VideoView to select whether it uses audio focus during
playback, and how.
Add support for AudioAttributes
Test: cts-tradefed run cts -m CtsWidgetTestCases -t android.widget.cts.VideoViewTest
Bug 30955183
Bug 30258418
Change-Id: I581d32c79c78b8197ded2319e0d5bfdc35b93c5e
It was accidentally broken during a previous commit where the CTS test
failure was ignored by a known issue being fixed in another change -
this change fixes both problems.
Bug: 33550221
Bug: 3380254
Test: CtsAutoFillServiceTestCases pass (for real now :-)
Change-Id: I5b2aa6060995ca255e51d85aa6ec93a886fa522f
This will now be controlled by individual accessibility services.
We'll provide the password information to them, and they can
present or hide the information as it makes sense for their users.
Password information was anyway provided when a headset was
connected.
Bug: 28139568
Test: Manually verified that TalkBack now speaks passwords on the
lock screen and in text views. Since I'm removing functionality
that didn't have tests, it's tricky to have specific tests.
Change-Id: Ic3c724ccce5762ee9dcd9e7dcbd4eae6734dd05e
When sending a ViewNode to the auto-fill service, it's necessary to sanitize
it so it does not contain PII (Personally Identifiable Information).
A good rule of thumb is to mark as sanitized nodes whose value were statically
set from resources. Ideally, that logic should belong to View, but View does
not know how its contexts are set, so the decision must be made by the
subclasses, and this CL implements that logic on TextView (which is the main
auto-fill type - others will come soon...)
Bug: 33269702
Test: CtsAutoFillServiceTestCases pass
Test: manual verification
Change-Id: I4dcdd8419a35812bd2f15a63a5be85f8cd97bb4e
Due to not cherry-picking this change into N_MR1 fix the
version check to reflect this.
Bug: 28019187
Test: run cts-dev -m CtsWidgetTestCases -t \
android.widget.cts.CalendarViewTest
Change-Id: I128d25c3ed949729e2afaeefad381bfb58d89ccd
Gets rid of setting auto-size configuration
items one by one and instead provides setter
constructs that take all the params needed
to auto-size. This version is much closer to
how this feature can be set up from XML
attributes and also provides no doubt about
validation failures.
Bug: 32221168
Bug: 34494052
Test: in attached topic CL
Change-Id: Ic70ad43d5c6739ee312ea24984534a35c49c17dc
Currently the icon defined by the host AbsListView is displayed
over the fast scroll area.
Bug: 35424111
Test: manual
Change-Id: Ia9897a44550922f16573b97337841c3f6ae263da
This cl also updates label strings, renames an internal method,
and fixes some bugs in TextClassifierImpl caught by tests.
Test: See: I31ee94177e58c986e61e9b24c6c5816fa4b022e1
Bug: 34778263
Bug: 34922928
Change-Id: Ibf60d345d462dfc8a13dead6f01053f1ae50f35a
Doing this allows us to annotate integer values that should corresponds
to WindowManager.LayoutParams#softInputMode.
Test: There should be no behavior change. RetentionPolicy.SOURCE
annotation should change nothing in production code.
Test: checkbuild
Bug: 32784563
Bug: 35079353
Change-Id: I96300b090edce327d0515c740183abe91ded6bac
Reverts the change which adds a gesture detector in
TextView for detecting clicks on ClickableSpans. A click
is considered MotionEvent.ACTION_UP. Revert needed because
the singleTapUp refactoring has a potential to break
existing apps.
Bug: 23692690
Test: attached in the same topic
Change-Id: Ife47fd0608480130123091bc60a7e9dd1efe8785
The current PopupWindow implementation might call
the anchor view's getLocationInWindow even if the anchor
is currently detached from the window (and the location is
a meaningless (0,0)). This results in the popup jumping to
the top of the screen.
This patch is adding tracking of the anchor's attachment state.
The position is never updated while the anchor is detached.
When the anchor is re-attached, the popup position is updated.
Bug: 34853580
Test: manual (see bug)
Change-Id: Icca1b9b558a70ee3edbe6236e076d2d08a1f8f11
This CL is no-op (cosmetics only)
* renames autoSizeText type "xy" to "uniform"
* renames attribute "autoSizeStepSizeSet" to "autoSizePresetSizes"
* renames "AUTO_SIZE_TEXT_TYPE_XY" to "AUTO_SIZE_TEXT_TYPE_UNIFORM"
* renames public TextView#getAutoSizeTextPresetSizes() to public
TextView#getAutoSizeTextAvailableSizes() because this method can
return either preset sizes or computed sizes (via min/max/step)
Bug: 34923754
Bug: 32221168
Test: associated test renames in the same topic
Change-Id: Ifacccf21ca014b6c0a07322fa02b7859ee53e387
1. Menu groups are now separated by dividers
2. Update to menu item spacing as specified in new UX mocks
3. TextView-Editor now passes the "assist" menu as a group
4. "Share" menu reordered after "Cut/Copy/Paste" as per UX mocks update.
Test: Manual tests.
Bug: 34777048
Bug: 34777833
Change-Id: I3d435d8a38e5b146a54706f12dbf3ff629c504bf
* getter/setter for predefined sizes
* reads and configures from XML at construction time
* fix for an ugly bug where the sizes were missing an
entry in certain cases, e.g: min = 10; max = 20;
step = 2 would have produced [10, 12, 14, 16, 18]
instead of [10, 12, 14, 16, 18, 20]
* fix using getHeight()/getWidth() instead of
untrusted getMeasuredHeight()/getMeasuredWidth()
and move the auto-sizing triggering to
onLayout() instead of onMeasure() (while manually
testing discovered missing or extra pixels and
sometimes resizing being skipped - it's all fixed
now)
* fix using deceiving getTotalPaddingBottom()/...Top()
and replaced with getExtendedPaddingBottom()/..Top()
(getTotal... was removing the whitespace height but
auto-size needs to know about it so it can fill the
space)
Bug: 32221168
Test: attached in the same topic
run cts-dev -m CtsWidgetTestCases -t \
android.widget.cts.TextViewTest
Change-Id: Id5a31d0d32b2b4082af45b4bd65af8cb85bdc92e