adds a method for returning whether the cursor is blinking based on the
current value of the mCancelled property in the Blink class. This
method is only inteded to be used for testing purposes.
Bug: 228354442
Test: manual, method is called in CtsWidgetTestCases:EditTextTest#
testSuspendAndResumeBlinkingCursor,
testCursorBlinkingOnNewActivity_WithFocus,
testCursorNotBlinkingOnNewActivity_WithoutFocus
Change-Id: I02849f6e105cbfe7af78dfb34ffbf1ebbb4a82ae
Cursor continues to blink in a text field even when the text field is
not currently visible. This change checks the visibility of the window
that houses the text field in addition to checking if the view is in
focus.
Bug: 228354442
Test: Added logging to the shouldBlink() method ran following steps:
1: open contacts app
2: tap add new contact, tap in an edit field
3: move back to home screen
4: lock screen, then unlock screen
5: observed logs written out to logcat console when app not
visible.
after change logs no longer printed to console, cursor still blinks
correctly after app is re-opened or when new field becomes in
focus.
Test: CtsWidgetTestCases:EditTextTest#
testCursorNotBlinkingOnNewActivity_WithoutFocus()
testCursorBlinkingOnNewActivity_WithFocus()
testSuspendAndResumeBlinkingCursor()
Change-Id: Iad4396e5f7fd810344c711320d65c57ea25eda70
Merged-In: Iad4396e5f7fd810344c711320d65c57ea25eda70
Test: atest CtsContentCaptureServiceTestCases, observed events reported only once on scroll and stop as well as on fling
Bug: 211899037
Change-Id: Id67fcc360bf63fcab1d9f345c31d2bf7b9a173d6
> This would allow us to easily extect the options
> Also passing the executor for async inflation. This will allow
containing adapters to also be async if the parent View is using
async inflation
Bug: 202766048
Test: Presubmit
Change-Id: I60a9b5db5f9b5f8d6e56521ee00de4be30decce6
In horizontal layouts, when elements are rendered from LTR, the
definition of "before" and "after" gets flipped, causing the divider
spacing to be allocated to the wrong locations. By flipping the check in
RTL layouts, the dividers can be placed correctly.
Additionally, it is necessary to add divider measurements to all layout
width measurements to allow for dividers in right gravity to layout
properly.
Bug: 208927871
Test: atest android.widget.cts.LinearLayoutTest
Change-Id: If6e917873571484a6fb1dfc28b356289e2cc1ffa
TextView.setText(char[]) is from API 1 and follows a running with
scissors API style of not copying the passed array.
To avoid a leak, in TextView.setText(String), the char[] would be nulled
out. However, an internal object could have been read using .getText()
prior to this second setText would immmediatly become a
CharSequence that crashed when you called any methods on it.
After this change, the CharWrapper will stay valid if had been
previously retrieved. The general shape of the API will be maintained.
Fixes: b/227218386
Test: atest android.widget.TextViewTest
Relnote: "Calling TextView.getText() after calling TextView.setText(char[])
will now return a valid CharSequence. The char[] pointed to by this char
sequnece may still be mutated by future calls to setText(char[]), but it
will no longer allow a (char[]) null to be set, which lead to crashes
when reading CharSequence returned from getText on TextView."
Merged-In: I35a2a76d58ec1946dace2f615cacf6a6085efdeb
Change-Id: I35a2a76d58ec1946dace2f615cacf6a6085efdeb
(cherry picked from commit 166c7217f4)
Text team owns the text related module in widget.
The previous per-file line was not working due to extra spaces between
files list.
Fixed by removing white spaces and also change to refer the text team
OWNERS file.
Bug: 234759754
Test: N/A
Change-Id: I3302de8fd90a12e7745f15d07c8c53c900bb3a14
The text is not selectable while translated. Making translated text
selectable requires many more changes.
This was tested in Nextdoor in the feed/posts activity. When there is a
"Read more" link in the post, the link doesn't work while translated,
and doesn't behave the same way after translation is paused.
Bug: 202966891
Test: atest CtsTranslationTestCases
Test: Manually - with Nextdoor on feed and chat activities
Change-Id: I6e8f532d427d85ff22df0deb248d8416a15f4821
With ag/17952046 we now actively intercept KEYCODE_BACK before they are
sent to IME when new back flow is used. This requires us to migrate
AutoCompleteTextView#onKeyPreIme, and is also what causes the test
failure in b/231960630.
Test: atest AutoCompleteTextView test.
Test: Test back behavior of AutoCompleteTextView in BackTestApp.
Bug: 231960630
Change-Id: I1a5e01c9a4f8f0e762b493284650854a230aecd3
Right now, when an update is triggered, DateTimeView will trigger a full
relayout of its parents because it always calls setText, even if it
doesn't change the contents (later down the line, TextView will call
requestLayout() for wrap_content, even if size didn't change).
Checking if the content actually changed avoids that extra layout pass
which avoids needless relayouts in e.g. SystemUI Notifications.
Bug:220712538
Test: atest DateTimeView (new test failed before fix / passes after fix)
Change-Id: Ib391d6715136b64b98f0bda3b3d4a3f991809c89
Some TextViews are made as password via input type but does not
contain autofill password hint. This change auto append a hint
for autofill to identify.
Bug: 219844915
Test: atest android.autofillservice.cts.dialog.LoginActivityTest
Change-Id: Ifd18c56ffe788a601821d178ace41413f9e0454e
Because mutability is propagated across Parcel and Binder, any mutable
Bitmaps passed to RemoteViews will end up mutable on the other side
even though those Bitmaps can't be modified from the RemoteViews
recipient.
Make all Bitmaps passed to RemoteViews immutable in order to ensure
that they can be sent without additional copies instead of the one
ashmem object.
Test: TH, RemoteViews work for widgets
Bug: 227920378
Change-Id: I477e7132f9ff78333c1eda56b9d0fc6ac520abd0
Bug: 219968356
Test: In BackTestApp, show popup window and swipe back to close it.
Test: CTS: android.widget.cts.BackInvokedOnWidgetsTest#popupWindowDismissedOnBackGesture
Change-Id: Ic22c12e2ed9f1c961f6e0abfdaf3d2a9a7bd2934