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
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
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)
Add @NonNull to TextView.setText(@NonNull char[], ...)
This has always thrown a NPE since API 1.
Bug: b/227218386
Test: atest android.widget.TextViewTest
Relnote: "TextView.setText(@NonNull char[], ...) added nullability
annotation."
Change-Id: I212bb5b73d00185f83adb5e74d4acd07a1410ca8
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."
Change-Id: I35a2a76d58ec1946dace2f615cacf6a6085efdeb
Bug: 232903223
When a user flings the overscroll toward the scrolling
content, the user might think that any left-over velocity
should apply to scrolling the content. This CL makes that
happen. If the fling is less than the overscroll distance,
then the normal spring is applied.
This CL changes ListView, ScrollView, and HorizontalScrollView.
Test: manual testing and new CTS tests
Change-Id: I1a759377f5183eec805598a6b016515297191624
This is the third step towards deprecating
InputMethodManager#mRequestUpdateCursorAnchorInfoMonitorMode,
which was introduced as a minimum implementation to support
CursorAnchorInfo API in EditText [1].
With this CL, mRequestUpdateCursorAnchorInfoMonitorMode is effectively
deprecated and does nothing except for methods marked with
@UnsupportedAppUsage.
All the remaining valid usages will be handled by the following newly
introduced fields:
- Editor.InputMethodState#mUpdateCursorAnchorInfoMode
- Editor.InputMethodState#mUpdateCursorAnchorInfoFilter
[1]: I3c6b69bd9d79b199afe68d838f25effa6048e5cc
cf8421df856a5950729ff1d0e73f21d480aa98fb
Bug: 236713697
Test: atest CtsInputMethodTestCases:InputMethodServiceTest#testOnUpdateCursorAnchorInfo
Test: atest CtsInputMethodTestCases:StylusHandwritingTest
Change-Id: I9fc930fbe39c3bdf913e3d7012fdd22805564d3b
Use CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE in place of
CAPITALIZATION_FOR_STANDALONE for date formats, since ICU does not
capitalize (at least) month names correctly today according to
https://unicode-org.atlassian.net/browse/ICU-21631. The motivating
example is the DatePicker/SimpleMonthView for Vietnam with "{month}
{year}" (as used in the manual date selection in the Date & Time screen
of the System settings): it does not capitalize the month without this
change.
It's difficult to know which formats will be affected, so this change
modifies all the formats found in frameworks/base/ that currently
express a preference for STANDALONE. The fix may be available by ICU 72,
at which point this change can presumably be reverted as signified in
the TODOs.
Bug: 229287642
Test: Inspection of Date & Time settings + compilation only
Change-Id: Iea753d0318aef55c6dd4f7e09068a0362ac970d8
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
Introduced View#setHandwritingBoundsOffset and xml attributes to
enlarge the view's stylus handwriting bounds. With this API, it's
possible to make handwriting bounds larger than the view's visible
bounds, and makes handwriting easier to trigger.
Bug: 211764956
Test: atest android.view.stylus.HandwritingInitiatorTest
Test: atest android.view.cts.HandwritingBoundsOffsetTest
Change-Id: I7a3749f78df82eee08ad29761cd52d7452114873
This enables handwriting to be started before the input connection is created for custom text editor views which are not EditTexts.
Fix: 218907674
Test: atest CtsInputMethodTestCases:android.view.inputmethod.cts.StylusHandwritingTest
Change-Id: I1ff3b0ffd609e1ec9f1efc477d00fee998ac9966