| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
Bug: 211763729
Test: atest FrameworksCoreTests:HandwritingInitiatorTest
Test: atest FrameworksCoreTests:HandwritableViewInfoTest
Test: atest FrameworksCoreTests:HandwritingAreaTrackerTest
Test: manually test
Change-Id: Ica9ee82cf1dc41feb5e4ff0f52ee13c1e4de8ad4
|
| |
|
|
|
|
| |
Just a small cleanup. TextView.getText() looks like it has some logic we might not want to repeat.
Change-Id: I364458d979275ad5dff24983e4ee2b9469f91155
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to changes in R, the a11y framework no longer dispatches touch
events for a long press. This prevents the activation of EditText's floating menu.
We can re-enable it by implementing the proper a11y action
ACTION_LONG_CLICK. The menu itself is diffult to access through TalkBack's linear
navigation, but this is future work for a separate known issue.
Start and stop the menu for editable TextViews, which includes EditTexts.
Since touch events are no longer sent by a11y, separate the
accessibility handling from the touch handling infrastructure for long clicks in Editor.
We can't go through the main performLongClick code because it doesn't
actually start the action mode but rather sets pending, which routes
back to TextView. There's too little separation between the touch events and action logic.
Whoever touches the performLongClick code may need to also make
corresponding changes to the a11y path, but I suspect this won't happen often.
Remove the onInitializeA11yNodeInfo override for EditText because this
is handled by TextView.
Bug: 148127445
Test: Tested text fields in various apps. ag/10602004. atest
FrameworksCoreTests:TextViewActivityTest#testToolbarAppearsAccessibilityLongClick
Change-Id: I3958e5b80e6156e03c99335e0d0b671438965ebb
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fact that View's constructor may call other methods before the
TextView constructor has a chance to initialize values means that
getText() may return null in the rare case where it is called
before the constructor.
Protect getText() from running into errors when the text is null,
as it just means the value is not ready yet.
Bug: 71638589
Test: CTS in topic
Change-Id: Ie11233416385353f78e3ee27fb0d3ec9b671512f
|
| |
|
|
|
|
|
|
|
| |
EditText#getText assumes the text is editable. However if this is
called during construction, the text might still be a String.
Bug: 36972818
Test: bit CtsWidgetTestCases:.EditTextTest
Change-Id: I811fad057f33666692930cb60d696740f7b40a19
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
rework the edit text introduction and overview.
- adds an example of a basic configuration
- discuss the inputType attribute
- cross link to relevant classes & methods
- Rework the edit text introduction and overview
- wrap guide link in a p to emphasize
- emphasize specifying the inputType is required
Test: docs only change. Verified with doc test build
Change-Id: I78d8c861c51117bfd61e8c37ad83854a2aeec967
|
| |
|
|
|
| |
Change-Id: I92725144d737ed182e6ece7018a9f8d075fb5ba7
Test: Manual
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Created an AutoFillManager class, which provides methods to show
the auto-fill bar for views and virtual nodes.
- Automatically launches an auto-fill request when the IME is shown
(and an AutoFillService is set for the given user) on TextViews.
- Updated VirtualNodeListener to use this new API.
BUG: 31001899
BUG: 34171325
Test: CtsAutoFillServiceTestCases passes
Test: manual verification
Change-Id: Id72ce97da70217081b5823cfc7b138412634fcf3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Contains:
* getters/setters for all auto-size config attributes
* verbose JavaDocs
* isolated and reused the setup part of auto-size
* some variables had to become instance fields
* clarified some variable names
In a few words, whenever a configuration setter is
called, the value is assigned and setupAutoSizeTextXY()
gets called. The latter tries to build all the
intermediary values that it needs, attaches default
values, etc. If it is successful then it makes a call
to autoSizeText(), else it throws a runtime exception
with an appropriate message.
Bug: 32221168
Test: attached in the same topic
Change-Id: I448454ef4490102c8cc2b19e0e16e998aeb45cd0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Explicitly split View methods into Assist and AutoFill methods, rather
than use an overloaded method that takes flags.
- Simarly, renamed ASSIST_FLAG_SANITIZED_TEXT and
ASSIST_FLAG_NON_SANITIZED_TEXT flags to
AUTO_FILL_FLAG_TYPE_FILL and AUTO_FILL_FLAG_TYPE_SAVE respectively.
- Created a AutoFillUI class to host the auto-fill bar and other UI
affordances.
- Moved the temporary notifications to AutoFillUI (eventually that
class will host the real UI).
- Moved FillData to android.app.view.autofill package.
- Split IAutoFillCallback in 2 (IAutoFillAppCallback and
IAutoFillServerCallback, residing at the app and system_server
respectively), so service cannot fill the app directly (which lets
the framework control the UI).
- Moved assist's IResultReceiver to AutoFillServiceImpl so
system_server can act as a mediator between the AutoFillService
implementation and the app being auto-filled.
- Replaced FillData and FillableInputFields by a bunch of new objects:
- FillResponse contains a group of Datasets, each representing
different values
that can be used to auto-fill an activity (for example, different
user accounts), optional id of fields the service is interested
to save, and an optional bundle for service-side extras.
- Dataset contains a name, Fields, and an optional bundle for
service-side extras.
- Fields contain an AutoFillId (parcelable) and a value (Bundle)
- Changed the temporary notifications to emulate the new workflow:
- Initial notification requests the auto-fill data but do not
auto-fill.
- Once service calls back, a new notification is shown with the
results.
- Then if the user selects a dataset, the activity is auto-filled
with it.
- It also shows a notification to emulate what can be saved.
- Created an VirtualViewDelegate for views that uses a virtual
hierarchy for assist data.
- Added new methods on ViewStructure to add children with virtual ids.
- Added 2 methods on View to support auto-fill:
- autoFill(Bundle) to auto-fill the view.
- getAutoFillType() to return how the view can be auto-filled.
- AutoFillType defines the input fields that support auto-fill:
- Text fields (like EditText)
- Toggle fields (like CheckBox)
- Lists (like RadioGroup)
- AutoFillType can also have a sub-type representing its semantic (for
now only text fields have it, and it's the same as getInputType()).
- etc :-)
Bug: 31001899
Test: manual verification
Change-Id: I2dd2fdedcb3ecd1e4403f9c32fa644cb914e186f
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Introduces a new protected hidden method that
specifies if the TextView (or descendant) widget
supports the autosize feature. All direct children of
TextView (besides EditText) support it.
Bug: 33098425
Bug: 32221168
Test: attached in the topic
Change-Id: I6f0092b4c9948afb427fe597b0515a39b1f258f6
|
| |
|
|
|
|
|
| |
Additionally this CL removes spaces at the end of the line.
Test: code still compiles.
Change-Id: I1ce98b4e70aa3ae614f87966c3bc6181fa4389a4
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A text filter may shorten the text, so we need to use the text
that's actually in the View, not the text we requested, to move
the selection.
Also removing the override of performAccessibilityActionInternal,
which should have been done as part of adding text actions initially.
Bug: 28253708
Change-Id: I184f49dcba0238f4ccc222597cefca258393b263
|
| |
|
|
|
| |
Bug: 25486055
Change-Id: I38e5a65e216b7ea7da42a01040126b2c2cc8c661
|
| |
|
|
|
|
|
|
| |
Update EditText.setEllipsize JavaDoc to describe that MARQUEE is not
supported by EditText.
Bug: 26219977
Change-Id: Ibe709f3470a749c0fbb672c8ec33f0835c5d90ec
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently TextView state is saved whenever selection is set even if
freezesText is false. This causes inconsistencies with the described
behavior for the attribute. This CL updates the behavior as:
- Always save the text for EditText
- Always save the selection if there are any.
- Do not save the text for TextView if freezesText is false.
- During onRestoreInstanceState if selection is out of the text
boundaries, do not restore the selection.
Bug: 22076905
Change-Id: I5e05d343e752a7d106c8881993e4d95ae21a38ce
(cherry picked from commit 8535836673c801effce097c54f55814ef88448e7)
|
| |
|
|
|
|
| |
bug:25486055
Change-Id: Ibbc8acbc98d38e903bc65b4032ca12de7c50ba62
|
| |
|
|
| |
Change-Id: I031443de83f93eb57a98863001826671b18f3b17
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce new AssistData class that contains all data
the framework automatically generates for assist. Currently
populated with a very simple tree structure representing
the app's view hierarchy.
Reworked how we populate the class name for accessibility
info, so this is provided through a new method call on View
that subclasses can override. This method is also used
to populate the class name in AssistData.
Change-Id: Ibd0acdc8354727d4291473283b5e4b70894905dc
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ensures that delegate code is run last. Previously, calling the super
method from an accessibility delegate set on a widget would only run
code in the widget's parent. Next, the delegate code would run. Finally,
the widget's code would run. As a result, the widget code would override
any data supplied by the delegate.
By moving all overridden code to internal methods, we ensure that the
call chain for super includes the widget's parent code followed by the
widget's code. The delegate code will always run last.
BUG: 17641433
Change-Id: Ib9d403156c1fc4fb04f65f3c126d1277a44b3740
|
| |
|
|
|
| |
Bug: 12872344
Change-Id: I85a3805ab0c34b96a7d4228f2382c8ff664e36e8
|
| |
|
|
|
|
|
| |
Also updates the constructor of every class that extends View.
BUG: 10676369
Change-Id: Ifaf27bf82028d180afa4931c0e906df88d858ac3
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Fix for bug 8656899 API REVIEW:
android.util.PropertyValueModel/ValueModel,
android.widget.ValueEditor etc
Revert the change that added this API to remove it outright.
This reverts commit 989709a973448980f36dacd587b0a58f89ffa11e
Change-Id: I9018cd8dadb1b1a54ad8749c816bd02bb7e7a38b
|
| |\
| |
| |
| |
| |
| |
| | |
api guides and add some attributes to Spinner and Switch" into jb-dev
* commit '7c00f81606de1880c3f28e54cea064c3b90da3e7':
docs: fix a bunch of links from javadocs to api guides and add some attributes to Spinner and Switch
|
| | |
| |
| |
| |
| |
| | |
and add some attributes to Spinner and Switch
Change-Id: If015ad000c1a36e19904c132e98ebff1ceaf718b
|
| |/
|
|
| |
Change-Id: I80fe18e0e15f8a840d558de9863650505bd5fb00
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to only framework classes.
AccessibilityEvent and AccessibilityNodeInfo have a property className which is set to the source
Java class. This is problematic since leads to leaking private classes which would allow an
accessibility service to load classes from other packages. This is strongly undesirable since
not trusted code can be loaded, and hence executed, in the accessibility service. To address
that the class name is set to the most concrete framework class extended by the info/event
source.
bug:5878943
Change-Id: I7b3114ece8772ea2773f5151e21b8a6f2006882a
|
| |
|
|
| |
Change-Id: I817e885524951853182b0458df4a32dea1614243
|
| |
|
|
|
|
| |
Also features some comment typos and import re-ordering.
Change-Id: I32cb14419d7d349064032718469daf62a0a72e3a
|
| | |
|
| | |
|
| | |
|
| |
|