Commit Graph

19202 Commits

Author SHA1 Message Date
Taran Singh
ba58e63d52 Merge "Introduce Scribe Rich gestures API" 2022-08-24 06:40:48 +00:00
Vishnu Nair
907f26446f Merge "SurfaceView: Fix incorrect position changed check" 2022-08-23 22:56:48 +00:00
Vishnu Nair
91496017e6 Merge "SurfaceComposerClient: Remove setSize" 2022-08-23 21:48:45 +00:00
Vishnu Nair
1ba48ac8d2 Merge "SurfaceComposerClient: Expose default apply token" 2022-08-23 21:48:35 +00:00
Daniel Norman
f118b24feb Merge "Allow app-process tooling to navigate the AccessibilityNodeInfo tree." 2022-08-23 16:06:41 +00:00
Taran Singh
3e3ff1a3d2 Introduce Scribe Rich gestures API
During a stylus handwriting session, user can perform a
stylus gesture operation like  Select, delete, insert on an
area of text. IME needs APIs to perform these gestures on text.
This CL introduces API signature for Select, delete, insert gestures.

Design doc: go/scribe-gestures-api

Bug: 239783077
Bug: 210039666
Test: Manually build & compile HandwritingIme

Change-Id: I53bcb62e03ac1c371feb60d1385c88c921754092
2022-08-22 14:22:47 -07:00
Daniel Norman
57bb237ac7 Allow app-process tooling to navigate the AccessibilityNodeInfo tree.
This change bypasses the AccessibilityService and directly
connects AccessibilityInteractionClient to ViewRootImpl's
AccessibilityInteractionController.

Bug: 238391032
Test: Use for Espresso a11y testing
Test: atest AccessibilityEndToEndTest
Change-Id: I0881067a9e5290e208cf3065c149f2a3b433b80c
2022-08-22 17:37:55 +00:00
Treehugger Robot
6debd63a75 Merge "View OWNERS: include PendingInsetsController.java in the WindowManager rules" am: ce2023b664 am: c20cde6ce5 am: 3edaa51344 am: 6cdbdf26c3 am: d22d44dd2e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2190615

Change-Id: Ic241516467d6eec5c98fa918fd1f9ae7b504f845
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 13:34:54 +00:00
Treehugger Robot
d22d44dd2e Merge "View OWNERS: include PendingInsetsController.java in the WindowManager rules" am: ce2023b664 am: c20cde6ce5 am: 3edaa51344 am: 6cdbdf26c3
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2190615

Change-Id: Iddd6f583f9c71d13a24a53d333fd5a97a7d9f26d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-22 13:15:58 +00:00
Ming-Shin Lu
33d5d471f4 Merge "Fix WIC#hide(ime()) no-op when IME insets not controllable" 2022-08-22 08:36:50 +00:00
Hongwei Wang
17ed770a06 Merge "[Re-land] Remove getSfInstance usage from ViewRootImpl" into tm-qpr-dev am: 5238c74d09 am: e38914405d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600075

Change-Id: I4d69a0790a0a04fddfcbe807cfa78b698f2312bf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 22:57:03 +00:00
Hongwei Wang
e38914405d Merge "[Re-land] Remove getSfInstance usage from ViewRootImpl" into tm-qpr-dev am: 5238c74d09
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600075

Change-Id: Ic93af6c2551e85c439765e3e47592a25d51fac5d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 22:28:26 +00:00
Hongwei Wang
5238c74d09 Merge "[Re-land] Remove getSfInstance usage from ViewRootImpl" into tm-qpr-dev 2022-08-19 22:03:03 +00:00
Hyunyoung Song
fe0cbe512d Merge "Add passive callback for system-run insets animation" into tm-qpr-dev am: 7f9f126df7 am: 89612ae180
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19434248

Change-Id: I3cadba2101521a0093861b9e4c5660c8fa6eb39d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 19:12:33 +00:00
Hyunyoung Song
89612ae180 Merge "Add passive callback for system-run insets animation" into tm-qpr-dev am: 7f9f126df7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19434248

Change-Id: I9544fd82036706c19031597c1fdf8e316c5f3f09
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 18:38:26 +00:00
Hyunyoung Song
7f9f126df7 Merge "Add passive callback for system-run insets animation" into tm-qpr-dev 2022-08-19 18:37:40 +00:00
Ming-Shin Lu
ca7c4b3757 Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode" into tm-qpr-dev am: a9fa413a21 am: 4141dae212
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600536

Change-Id: I7a7ed559b4e063bd44a2365ad449c2014ca9932b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 17:37:03 +00:00
Fiona Campbell
9fc75e8977 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev am: a01ccaae13 am: 477064e500
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19638897

Change-Id: If73108977792457238cab50ae67ed62e66e89096
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 17:36:07 +00:00
Ming-Shin Lu
4141dae212 Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode" into tm-qpr-dev am: a9fa413a21
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19600536

Change-Id: Ied238b5980f4609b5a0a9b77301f691a6dd0637d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 16:14:11 +00:00
Fiona Campbell
477064e500 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev am: a01ccaae13
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19638897

Change-Id: I32169097c0b807836bb989f60111cedcd49191b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-19 16:11:34 +00:00
Ming-Shin Lu
a9fa413a21 Merge "Fix toggleSoftInput can't hide IME when the app in multi-window mode" into tm-qpr-dev 2022-08-19 14:52:59 +00:00
Fiona Campbell
a01ccaae13 Merge changes I36ea0ffc,I1f3797c5,I01aeeedd into tm-qpr-dev
* changes:
  Add constraints to window duration scale
  Add constraints to animation duration scales
  Ensure animation scales are within bounds
2022-08-19 14:49:40 +00:00
Adrian Roos
b773c4dade View OWNERS: include PendingInsetsController.java in the WindowManager rules
Change-Id: I8b22a55ccfe3690e9879fcce221c4488f86a9a83
2022-08-19 07:11:47 +00:00
Hyunyoung Song
03110e20d9 Add passive callback for system-run insets animation
This passive window inset animation control listener
is used to for logging purpose when hide, show
method is called.

Test: atest InsetsControllerTest
Bug: 240192346

Change-Id: I399268ead9d04b356f10cc3e9ac1da9e31306e86
2022-08-19 05:15:29 +00:00
Vishnu Nair
0c2269fa4b SurfaceComposerClient: Remove setSize
This function is a noop with the introduction of BLAST.

Bug: 238781169
Test: presubmit
Change-Id: I84917bed157a93ec9bfd16d168312ce27ff1765e
2022-08-17 15:51:13 +00:00
Joanne Chung
cf488547e4 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d am: 20dbe919b1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Idabdc7d36d30c014d383163a2e01c51fa76bbf9a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 13:51:33 +00:00
Joanne Chung
59c6ae9f4d Merge "Fix translation session id collision bug." into tm-qpr-dev am: ebb357e1c9 am: 1551aae8d7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19423814

Change-Id: I3e422b41f68fc403dd22d9b6da8d677efe5678e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 13:50:48 +00:00
Vishnu Nair
64a5423477 Merge "SurfaceView: Revert SurfaceLock locking changes" into tm-qpr-dev am: 5b518a2a69 am: f40b84db0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19602637

Change-Id: Icda98649c9fdb764da1a329aaf2d59a60352cbea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-17 13:27:25 +00:00
Daniel Norman
1e924c4709 Merge "Revert "Limit off-label accessibility access using a new property."" 2022-08-16 23:17:30 +00:00
Vishnu Nair
f82e53bfc3 SurfaceComposerClient: Expose default apply token
The default apply token specifies which transaction queue transactions
from a process is sent to in surfaceflinger. This queue is used to
ensure transactions from a process are applied in order.

If a transaction from multiple processes need to be applied in order,
we can use a commit callback to act as a barrier or pass transactions
across processes to be applied on a single process. In some cases
where operations are intertwined it may be advantageous to set a
single transaction queue for multiple processes. In this case
this api can be used to set a single queue to apply transactions by
setting the same apply token on both processes.

Note this api if misused can result in surprising out of order
transactions.

Test: manually set the same applytoken on multiple processes and
verify they go into the same queue.
Bug: 242193885

Change-Id: I507b44686b393c1bb854bd593535a3a3874497af
2022-08-16 18:20:33 +00:00
Taran Singh
b203ed9435 Merge "Few improvements for Companion widget APIs" 2022-08-16 16:22:30 +00:00
Daniel Norman
ff3c059c29 Revert "Limit off-label accessibility access using a new property."
Revert submission 19246592-accessibility-tool-only

Reason for revert: Jank regression b/242267091
Reverted Changes:
I0685e6dd4:CTS tests for the accessibilityDataPrivate propert...
I1c02af88c:Limit off-label accessibility access using a new p...

Change-Id: I701b811fd4fb2634872a759134356736a7e8b7dd
2022-08-16 16:13:28 +00:00
Joanne Chung
20dbe919b1 Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev am: 9e263e643d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18800482

Change-Id: Ie4da503e5f569625c807bef1a194764cb5e133fe
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 13:08:55 +00:00
Joanne Chung
1551aae8d7 Merge "Fix translation session id collision bug." into tm-qpr-dev am: ebb357e1c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19423814

Change-Id: Iad538b9ee2aef1e58a9b292d8a36f27a7b79191b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 13:07:48 +00:00
Joanne Chung
9e263e643d Merge "Fix system toolbar doesn't use correct theme." into tm-qpr-dev 2022-08-16 10:00:57 +00:00
Joanne Chung
ebb357e1c9 Merge "Fix translation session id collision bug." into tm-qpr-dev 2022-08-16 09:52:18 +00:00
Tiger Huang
f114085baa Merge "Introduce IWindowSession#relayoutAsync" into tm-qpr-dev am: 81ae41092e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19194952

Change-Id: Iec4854d8c93a0e58a588d0483833b99a1ec38455
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 09:04:33 +00:00
Wilson Wu
908c368411 Merge "Refine {SHOW,HIDE}_MY_SOFT_INPUT constants" into tm-qpr-dev am: 08fc972311
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19569434

Change-Id: I4f26a508aa1e2081f4afcdf62ca00dc1d0a1949c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-16 09:01:38 +00:00
Tiger Huang
81ae41092e Merge "Introduce IWindowSession#relayoutAsync" into tm-qpr-dev 2022-08-16 08:44:11 +00:00
Wilson Wu
08fc972311 Merge "Refine {SHOW,HIDE}_MY_SOFT_INPUT constants" into tm-qpr-dev 2022-08-16 08:37:12 +00:00
Tiger Huang
3712433349 Introduce IWindowSession#relayoutAsync
IWindowSession#relayoutAsync is similar to IWindowSession#relayout, but
the former is an oneway method which just sends the layout attributes to
the server. Since the client can compute its own window frame, it just
needs to send attributes to the server without getting blocked for
receving the window frame.

In somes cases, the client still needs to obtain things from the server.
Such as:

- When view visibility is changed. The client maybe not be able to
  receive the latest insets state while it is INVISIBLE or GONE. In this
  case, the client needs to obtain the frame and the insets state. Also,
  the client need to obtain the surface control when it becomes VISIBLE.

- When the insets state is stale but the config is up-to-date. This can
  happen when WindowProcessController sends the new config to the client
  before WindowState does. In this case, the client needs to obtain the
  window frame from the server.

- When the position and the size of the frame are both changed. This
  will trigger a BLAST sync, and the client needs to obtain the sync seq
  ID.

For cases above, the client needs to call the original relayout method.

Bug: 161810301
Bug: 175861051
Test: Seamless rotation, fixed rotation, and regular rotation.
Merged-In: Ifb365789fa08103773fd3180e486ba1d92042fc5
Change-Id: Ifb365789fa08103773fd3180e486ba1d92042fc5
2022-08-16 12:49:31 +08:00
Tiger Huang
885fba406b Merge "Introduce IWindowSession#relayoutAsync" 2022-08-16 03:14:33 +00:00
Taran Singh
e609a5f25a Merge "Don't auto subscribe to CAI for stylus handwriting" 2022-08-16 00:30:13 +00:00
Vishnu Nair
f40b84db0a Merge "SurfaceView: Revert SurfaceLock locking changes" into tm-qpr-dev am: 5b518a2a69
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19602637

Change-Id: I48929e3415143d5aa25178fd1b5870feee5b635b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-08-15 16:31:13 +00:00
Vishnu Nair
3c15df1d04 SurfaceView: Fix incorrect position changed check
Position changed check was incorrectly checking the position with
window insets against one without window insets. This would cause
unnecessary updates if the window had insets.

Test: presubmit
Fixes: 242246240

Change-Id: If3a3d57e8ae28e111bee57601ce7237adf1d6a1d
2022-08-15 16:10:07 +00:00
Fiona Campbell
43ca1914b2 Ensure animation scales are within bounds
Ensure that all uses of TRANSITION_ANIMATION_SCALE setting are bounded
between 0 and 20.

Bug: 238178261
Test: adb shell dumpsys window windows | grep "Animation setting"

Change-Id: I01aeeeddcbcdce0824d61db6b8f4a8946595131d
2022-08-15 11:16:33 +00:00
TreeHugger Robot
805dcc2d74 Merge "Fix IME jumpcut when playing user IME animation after IME restarted" 2022-08-14 02:05:42 +00:00
Vishnu Nair
e0b684f7d0 SurfaceView: Revert SurfaceLock locking changes
This reverts commit 9e3cd0533f
and commit 74c760394a.

Initially we made a change to address a performance issue
in SurfaceView caused by holding the mSurfaceLock whenever
we went though the updateSurfaces loop. This had a side
effects of causing an ANR since the locking order changed.

The followup fix removed the lock but broke some API
contracts around lock and unlock canvas.

Subsequent fixes, which never went into QPR, introduced
new issues. Changing the locking order is too risky
QPR so lets revert and try to rework the locking
mechanism in U.

Test: app in b/234006724 does not ANR
Test: app in b/235188096 does not crash
Test: app in b/239895124 does not ANR
Test: app in b/239142077 does not crash
Test: atest SurfaceViewTest

Bug: 235188096
Change-Id: I99c5bb707ecad7c8d3c1fbd8b4105a77d58c145d
2022-08-12 17:35:40 +00:00
Vishnu Nair
e8c5a9273b Merge "Revert "SurfaceView: Ensure the Surface remains valid with SurfaceHolder#lockCanvas"" 2022-08-12 17:15:46 +00:00
Joanne Chung
9325f9b97e Fix system toolbar doesn't use correct theme.
The toolbar should set the theme to the app's theme. Because the
service cannot get the application context, we should pass this
information from application to service.

Bug: 218833400
Test: manual. Use light/dark theme for app, the toolbar shows with
the same theme
Test: atest TextViewIntegrationTest
Test: atest android.widget.TextViewActivityTest

Change-Id: I6d4e4e117c680ce57e760a87987059eded09b2bc
2022-08-12 16:54:34 +00:00