Commit Graph

9361 Commits

Author SHA1 Message Date
Joanne Chung
af1fff3994 Merge "Fix the translation not work if the animation is off" into tm-dev am: 8121a43efd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17240423

Change-Id: I99c3e48c94e6dc27cd3da3d996643c83ba9f405b
2022-03-24 13:24:42 +00:00
Joanne Chung
8121a43efd Merge "Fix the translation not work if the animation is off" into tm-dev 2022-03-24 13:15:40 +00:00
Shan Huang
9a12be2b47 Merge "Migrate TextView to use OnBackInvokedDispatcher." into tm-dev am: 1506886e06
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17070232

Change-Id: Iafff83962cfdccecbd49f86ce54c9aabf019f778
2022-03-24 07:55:43 +00:00
Shan Huang
1506886e06 Merge "Migrate TextView to use OnBackInvokedDispatcher." into tm-dev 2022-03-24 07:41:49 +00:00
Joanne Chung
fe6fddb4f0 Fix the translation not work if the animation is off
The system will show translation after the animation is done but it
doesn't work if the animation is off. To fix the issue, we will
check the animation status before showing translation.

Bug: 215386127
Test: atest testUiTranslationWithoutAnimation

Change-Id: Id0d02c422100effcf842209971052f4d6e9b0bd2
2022-03-24 14:55:15 +08:00
Shan Huang
76561c0ce8 Migrate TextView to use OnBackInvokedDispatcher.
The OnBackInvokedCallback will be called when an app is requesting the new back dispatch behavior. Otherwise we keep dispatching KEYCODE_BACK to TextViews.

Test: Use backTestApp WidgetTestsActivity. Try selecting texts and
dimisss selection by swiping back. Both on TextView and EditText and
AutoCompleteTextView.

Change-Id: I9422f28ab650c5d77c75394fe6dcf2a3981f79c7
2022-03-23 22:37:40 +00:00
Sally Yuen
91b35e23ed Merge "Fixes for a11y selection" into tm-dev am: 8c3314f7aa
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17198946

Change-Id: I3792d41a856095cfadf37aa3b17eb2189a4bc6c7
2022-03-22 20:22:21 +00:00
Sally Yuen
8c3314f7aa Merge "Fixes for a11y selection" into tm-dev 2022-03-22 20:15:13 +00:00
Allen Su
508818fc58 Merge "Text Wrapping automation" 2022-03-22 05:44:23 +00:00
allenwtsu
f70429088a Text Wrapping automation
Bug: 220836284
Test: atest StaticLayoutTest
Change-Id: I2aead872b0b472b3c625e075348e46da768ff3be
2022-03-22 11:16:57 +08:00
Haoyu Zhang
b297b94fb1 Merge "Scribe in View: disable cursor drag when handwriting is enabled" into tm-dev am: b3c1d1984e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17199134

Change-Id: Iefae63d41b1cdfaa44c95cbf46dfdf3779ecfde8
2022-03-21 20:21:09 +00:00
Haoyu Zhang
b989691d71 Scribe in View: disable cursor drag when handwriting is enabled
Bug: 224587325
Test: manually tested
Change-Id: I607c0d9b71cb6cfd69704d850a2d3e00745c3fb4
2022-03-16 23:02:09 +00:00
Sally
55022a5880 Fixes for a11y selection
- TextView should request focus before performing selection on
  non-editable text, since selection requires focus. On the a11y
  service side, input focus should not matter when selecting
  non-editable text.
- Remove clickable and long-clickable states, since these are present
  due to TextView#setTextIsSelectable.
- Make UI controller changes consistent between SET_SiELECTION and
  SET_TEXT. Using SET_SELECTION means the action mode menu won't pop up
  and the left/right selection handles won't appear. Interactions
  between multiple EditTexts were previously inconsistent

- Delete some obsolete javadoc

Bug: 218357385
Test: builds and install: highlighting is consistent between SET
actions. highlighting works when selecting text in TalkBack, without
the service needing to purposely put input focus,
atest AccessibilityTextTraverssalText

Change-Id: I67986020aa112d45bd670f77b2b415617226c094
2022-03-16 22:01:19 +00:00
TreeHugger Robot
e8acb4a612 Merge "Update the text wrapping API." into tm-dev 2022-03-14 23:09:41 +00:00
Taran Singh
88af2f0b91 Merge "Use local coordinates in CAI#EditorBoundsInfo" into tm-dev am: a28f53b00d am: 90b0d74d60
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17049973

Change-Id: I8baa4cbeed48f03025bc6ce29c0812f4280d9c32
2022-03-10 20:03:52 +00:00
James.cf Lin
396c789426 Update the text wrapping API.
1) Update the LineBreakConfig class to be immutable.
2) Do not return null in the PrecomputedText.Params#getLineBreaiConfig API

Bug: 216638444
Test: atest TextViewTest; atest MeasuredTextTest; atest PrecomputedTextTest; atest TextViewPrecomputedTextTest; atest StaticLayoutLineBreakingVariantsTest
Merged-In: I93bcb6ebc35344e34e9bb8a24df375aa7b3a8d81
Merged-In: I07766137ff6639c7d4acaad07dbcf11a2841cdb0
Change-Id: I07766137ff6639c7d4acaad07dbcf11a2841cdb0
2022-03-10 09:58:40 +00:00
Taran Singh
a28f53b00d Merge "Use local coordinates in CAI#EditorBoundsInfo" into tm-dev 2022-03-10 08:06:26 +00:00
yingleiw
a3a06ac231 Rename ACTION_SHOW_SUGGESTSIONS TO ACTION_SHOW_TEXT_SUGGESTIONS
Fix: 217730256

Bug: 222537368

Test: Added test in EditTextTest (will merge later when reviewed).

Merged-In: I78354a0f1d955c5b7c1ead044ea49086b3479841
Change-Id: I78354a0f1d955c5b7c1ead044ea49086b3479841
(cherry picked from commit e1f392d171)
2022-03-04 16:42:54 -08:00
Julia Tuttle
1c472e50c9 RemoteViews: don't crash on null display in getLaunchOptions
While we investigate the root cause of this bug, turn the crash into a
warning.

Bug: 218409359
Test: none; we don't have repro steps for the bug yet
Change-Id: I6d699ea839726adc634a200a0057e316d59ecaa9
(cherry picked from commit 827d967199)
2022-03-04 19:45:27 +00:00
Chavi Weingarten
8a93d1378a Merge "SurfaceView: Synchronize all surface view changes with VRI draw" into tm-dev am: 5dcd46d356
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17051013

Change-Id: I8081b90e365829921634576d05b770ea5d572898
2022-03-03 18:25:15 +00:00
Chavi Weingarten
5dcd46d356 Merge "SurfaceView: Synchronize all surface view changes with VRI draw" into tm-dev 2022-03-03 17:57:05 +00:00
Taran Singh
25854407be Use local coordinates in CAI#EditorBoundsInfo
EditorBoundsInfo uses local coordiantes, it was mistakenly set with
screen coordinates

Test: atest InputMethodServiceTest
Bug: 217957587

Change-Id: Iadeaa793d1331b6208e4b19036c45120b0185f64
2022-03-03 17:47:01 +00:00
Vishnu Nair
797aa0066c SurfaceView: Synchronize all surface view changes with VRI draw
Re landing with the following changes:
We initially cloned the SurfaceControl handle to avoid locking when
accessing the SurfaceControl from the position listener callbacks
running from RT workers. But this meant the last reference to the
layer handle would only be released by GC. If SurfaceViews are
created and destroyed rapidly, we would be at the mercy of GC to
release buffers.

Original change:

There are three transaction queues that can submit SurfaceView
changes.

1. Buffer updates via BBQ apply token
2. SCC apply token
3. ViewRootImpl BBQ apply token

It makes sense for most SurfaceView changes to be synchronized with
ViewRootImpl draws since the caller can optionally synchronize the
change with main window content.

This change eliminates the tmp transaction that is applied directly
via the SCC apply token and instead applies them with the ViewRootImpl
draw transaction.

Also take the opportunity to scope down mSurfaceControlLock usage.

Test: atest SurfaceViewSyncTest
Test: go/wm-smoke
Test: run mem tests via forrest
Bug: b/217973491, b/221631942
Change-Id: Idba712d146e62d7346920dc4f060cba92d47fada
2022-03-03 16:07:15 +00:00
TreeHugger Robot
dc71c6ebf3 Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev am: 33a2b4bacd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16977626

Change-Id: I29837bf7a2474d1e1f8e4562a54ecc94d50f027b
2022-03-03 13:38:47 +00:00
TreeHugger Robot
33a2b4bacd Merge "Incorporate API feedback: CAI requestCursorUpdates()" into tm-dev 2022-03-03 13:27:04 +00:00
TreeHugger Robot
97eae7e16c Merge "Revert "SurfaceView: Synchronize all surface view changes with V..."" into tm-dev am: 1f014a4a51
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17048246

Change-Id: I1a66c41dd432f1077bf397c347566ed9d4ce43d7
2022-03-01 23:52:51 +00:00
TreeHugger Robot
1f014a4a51 Merge "Revert "SurfaceView: Synchronize all surface view changes with V..."" into tm-dev 2022-03-01 23:50:49 +00:00
TreeHugger Robot
148fc78a9d Merge "RemoteViews: don't crash on null display in getLaunchOptions" 2022-03-01 21:19:31 +00:00
Taran Singh
472e5c3825 Incorporate API feedback: CAI requestCursorUpdates()
1. Use intDef for CurosrUpdateFilter
2. overload requestCursorUpdates(mode, filter)
3. additional details in javadoc

Fix: 218314883
Bug: 210039666
Test: atest CtsInputMethodTestCases

Change-Id: I1dc5acac4f968b2a2d1780f2ee6c0145c7dcbbaa
2022-03-01 19:05:50 +00:00
Vishnu Nair
8dfd38ad76 Revert "SurfaceView: Synchronize all surface view changes with V..."
Revert "SurfaceView:  Avoid destination frame updates on multipl..."

Revert submission 16944940-sv-changes-tm-dev

Reason for revert: b/221631942
Reverted Changes:
I0d214e3f7:SurfaceView:  Avoid destination frame updates on m...
I0b5741b37:SurfaceView: Synchronize all surface view changes ...
I5226c304b:SurfaceView: Avoid destination frame updates on mu...

Change-Id: I35b7c1be7202ebe89a5309284a9401c8084e9d79
2022-03-01 18:55:13 +00:00
TreeHugger Robot
ddcb05dfad Merge "Allow watch rotary to trigger stretch on scrolling containers." 2022-02-28 19:11:02 +00:00
George Mount
33e79a15da Allow watch rotary to trigger stretch on scrolling containers.
Bug: 204794759

Rotary scrolling should trigger the stretch edge effect. Mouse
scrolling should NOT trigger the stretch edge effect. This
adds support for rotary scrolling while keeping mouse scrolling
from triggering the edge effect.

Test: new CTS tests. manual testing on emulator
Change-Id: Ibad25bcbc0740f2af2042baf67f7606f15b8c57e
2022-02-25 15:56:15 -08:00
Julia Tuttle
827d967199 RemoteViews: don't crash on null display in getLaunchOptions
While we investigate the root cause of this bug, turn the crash into a
warning.

Bug: 218409359
Test: none; we don't have repro steps for the bug yet
Change-Id: I6d699ea839726adc634a200a0057e316d59ecaa9
2022-02-25 17:05:16 -05:00
Vishnu Nair
fac56defb9 Merge changes from topics "cherrypick-sv-changes-8cq54jfvx9", "sv-changes-tm-dev" into tm-dev am: 7da5f02dc9 am: 62714d283b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16944940

Change-Id: I6e4b9481ae7197b6749accbb1fb1739bd027f61e
2022-02-25 19:18:52 +00:00
Nikolas Havrikov
3a1df35b29 Merge "Replace LinkedList by a more performant collection" 2022-02-25 07:18:58 +00:00
Vishnu Nair
7da5f02dc9 Merge changes from topics "cherrypick-sv-changes-8cq54jfvx9", "sv-changes-tm-dev" into tm-dev
* changes:
  SurfaceView: Synchronize all surface view changes with VRI draw
  SurfaceView: Avoid destination frame updates on multiple threads 1/2
2022-02-24 23:18:22 +00:00
Nikolas Havrikov
1e772adbf0 Replace LinkedList by a more performant collection
This is a semi-automatic change.
See https://errorprone.info/bugpattern/JdkObsolete for the rationale.

Test: make
Bug: 221046110
Change-Id: I21833d44e480cfc6943cadba6c7067f821065b5e
2022-02-24 10:28:46 +00:00
Yinglei Wang
65289974bd Merge "Rename ACTION_SHOW_SUGGESTSIONS TO ACTION_SHOW_TEXT_SUGGESTIONS" 2022-02-24 05:21:40 +00:00
Treehugger Robot
58ee675d61 Merge "Add pasteAsPlainText in some documentation where it is missing." am: f7ee046cd6 am: 9317b1ce92 am: 428d587d1f am: c88c4359bb
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1994510

Change-Id: I0a7305ad82252c2afa1ebb2270331159dfaac1c3
2022-02-23 17:11:09 +00:00
Treehugger Robot
c88c4359bb Merge "Add pasteAsPlainText in some documentation where it is missing." am: f7ee046cd6 am: 9317b1ce92 am: 428d587d1f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1994510

Change-Id: I6c87c09b7d652d5f122c2b6d321fe019afc8908f
2022-02-22 18:53:13 +00:00
Treehugger Robot
9317b1ce92 Merge "Add pasteAsPlainText in some documentation where it is missing." am: f7ee046cd6
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1994510

Change-Id: I4ca1cde07b1b92f6ed70443e72509ba3975504e4
2022-02-22 18:10:33 +00:00
Arthur Milchior
e33dd38c11 Add pasteAsPlainText in some documentation where it is missing.
I discovered this error in documentation while I needed to capture "PasteAsPlainText" in an android app. 
I suspect it might be missing in other folder too, but I’m not familiar enough with Android to be sure

Change-Id: I77af9b06eb602c4ba60b0744cc02f7449bc4f500
2022-02-22 12:20:54 +00:00
James Lin
2d26f03f3a Merge "Update the text wrapping API." 2022-02-19 01:31:52 +00:00
Vishnu Nair
6011059ed0 SurfaceView: Synchronize all surface view changes with VRI draw
There are three transaction queues that can submit SurfaceView
changes.

1. Buffer updates via BBQ apply token
2. SCC apply token
3. ViewRootImpl BBQ apply token

It makes sense for most SurfaceView changes to be synchronized with
ViewRootImpl draws since the caller can optionally synchronize the
change with main window content.

This change eliminates the tmp transaction that is applied directly
via the SCC apply token and instead applies them with the ViewRootImpl
draw transaction.

Also take the opportunity to scope down mSurfaceControlLock usage.

Test: atest SurfaceViewSyncTest
Test: go/wm-smoke
Bug: 217973491
Change-Id: I0b5741b376e042537c37ec34644e0a048eb4bfe0
2022-02-19 00:12:43 +00:00
James.cf Lin
4ae65dff9f Update the text wrapping API.
1) Update the LineBreakConfig class to be immutable.
2) Do not return null in the PrecomputedText.Params#getLineBreaiConfig API

Bug: 216638444
Test: atest TextViewTest; atest MeasuredTextTest; atest PrecomputedTextTest; atest TextViewPrecomputedTextTest; atest StaticLayoutLineBreakingVariantsTest
Change-Id: I07766137ff6639c7d4acaad07dbcf11a2841cdb0
2022-02-18 11:45:15 +08:00
Joanne Chung
5c1e5f7193 Merge "Update team OWNERS file." am: e96070ac89 am: 114d0c7773 am: 1bb2f28548
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: Ic8c77290b4d8e2d6cf8353a793b75cf71990a7a1
2022-02-16 05:24:07 +00:00
Joanne Chung
114d0c7773 Merge "Update team OWNERS file." am: e96070ac89
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1982066

Change-Id: I50a93d3e190ba2a4988e0777be2c5e571f2a2760
2022-02-16 04:42:57 +00:00
Joanne Chung
e96070ac89 Merge "Update team OWNERS file." 2022-02-16 02:03:49 +00:00
yingleiw
e1f392d171 Rename ACTION_SHOW_SUGGESTSIONS TO ACTION_SHOW_TEXT_SUGGESTIONS
Fix: 217730256
Test: Added test in EditTextTest (will merge later when reviewed).
Change-Id: I78354a0f1d955c5b7c1ead044ea49086b3479841
2022-02-15 13:58:36 -08:00
Xin Li
a6a261b1be Merge "Merge sc-v2-dev-plus-aosp-without-vendor@8084891" into stage-aosp-master 2022-02-14 17:30:12 +00:00