Commit Graph

17112 Commits

Author SHA1 Message Date
Yinglei Wang
f29de4df8f Merge "recreate a11y focused virtual node when findFocus" 2021-07-15 17:14:57 +00:00
TreeHugger Robot
917f69e779 Merge "Enable latency metrics" 2021-07-15 05:55:16 +00:00
TreeHugger Robot
16eafe2624 Merge "Avoid redundant InputConnection#reportFullscreenMode() callback" 2021-07-15 02:15:49 +00:00
Siarhei Vishniakou
cf0f680909 Enable latency metrics
The metrics were disabled in S because the WeakReference bugs could not
be fixed in time.

Enable them in T, which should allow sufficient time for the other teams
to resolve the WeakReference problems.

Bug: 169866723
Test: adb shell dumpsys input, watch for latency tracker starting to
collect data

Change-Id: I67c4028e7cb8b5e26616ab90b8b60fc871bf4407
2021-07-15 00:06:51 +00:00
Yinglei Wang
cbf9ec98c1 Merge "Revert "Update a11y focused virtual node properly"" 2021-07-14 20:04:31 +00:00
Rob Carr
0b1d3e49ad Merge "ViewRootImpl: Use mWindowAttributes directly for BBQ" into sc-dev am: b10b4141a5 am: 02962aeb72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14908372

Change-Id: I30af307f73be1a243aa92e0f33d997fe8bb25c57
2021-07-14 17:02:27 +00:00
Rob Carr
b10b4141a5 Merge "ViewRootImpl: Use mWindowAttributes directly for BBQ" into sc-dev 2021-07-14 16:23:45 +00:00
Yohei Yukawa
60089b284b Avoid redundant InputConnection#reportFullscreenMode() callback
This is a follow up CL to our previous attempts [1][2] to make
InputMethodManager#isFullscreenMode() be reliable and predictable.

What we haven't changed in our previous efforts is an edge case where
newly created InputMethodService always triggers

  InputConnection#reportFullscreenMode()

even when the same value is already returned from

  InputMethodManager#isFullscreenMode().

Note that this is one-shot anomaly and would not repeat once
InputMethodService creates its window once.  Although most of app
developers would not be having troubles, not having such a special
behavior is in general preferable.  Not having a special behavior only
after creating an IME is also important for our CTS, where we always
recreate MockIme to verify the system behavior from a known state.

As whether an IME is newly instantiated or not is not something apps
can easily rely on, changing this long-standing behavior is supposed
to be safe.

 [1]: Iba184245a01a3b340f006bc4e415d304de3c2696
      1544def0fa
 [2]: If23e7c7c265ab3dfb48c2fb6fdb361b17d22c594
      2bc66171cc

Bug: 129012881
Fix: 193589328
Test: atest CtsInputMethodTestCases:InputConnectionEndToEndTest
Change-Id: I7f600d9eefe200b99508e590ad8c2681643248a0
2021-07-13 22:30:45 -07:00
Robert Carr
e9c2e84d28 ViewRootImpl: Use mWindowAttributes directly for BBQ
The logic we are using to handle the params == null case doesn't make
sense, params=null just indicates nothing was changing on this relayout
and so we avoid passing to WM, not that we should default the format. We
can just use mWindowAttributes directly to avoid this problem.

Test: Existing tests pass
Bug: 190483641
Change-Id: I4a765914eb8ca33a432fc808af96847bb78fb054
2021-07-13 13:22:58 -07:00
TreeHugger Robot
f8a6eb6982 Merge "Optimize InputConnectionProtoDumper a bit" 2021-07-13 16:09:40 +00:00
TreeHugger Robot
2407ab11f2 Merge "Merge android.util.imetracing into com.android.internal.inputmethod" 2021-07-13 04:28:54 +00:00
Charles Chen
f6a88867ac Merge "Send DA's config directly when attaching to DA" into sc-v2-dev am: 427a66fa71 am: 9e5efe4aaf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15047821

Change-Id: I33c0d02c782d7bb7153224da5725fcc9b2472f3f
2021-07-12 20:53:11 +00:00
Charles Chen
427a66fa71 Merge "Send DA's config directly when attaching to DA" into sc-v2-dev 2021-07-10 05:02:32 +00:00
Tiger Huang
b4496c3d1d Merge "Use the real behavior to decide the animation" into sc-dev am: 26c159d640 am: 9850c01f66
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15232838

Change-Id: I3c4501dc1d140da74d42d09281561d5285d97221
2021-07-09 20:07:57 +00:00
Tiger Huang
efe2a20ec1 Merge "Use the real behavior to decide the animation" into sc-dev am: 26c159d640
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15232838

Change-Id: I0d3b8ab1074e3e3dcbce151f0b92f9751b079edd
2021-07-09 19:57:04 +00:00
Tiger Huang
26c159d640 Merge "Use the real behavior to decide the animation" into sc-dev 2021-07-09 19:36:27 +00:00
Yohei Yukawa
26b594af10 Optimize InputConnectionProtoDumper a bit
This is a mechanical refactoring CL that has no behavior change.

Currently all the utility methods defined in
InputConnectionProtoDumper return ProtoOutputStream, while the
returned instances will always be converted into byte[] eventually.
With this CL, those utility methods return byte[] instances directly,
which is expected to make it easier for ART/dexpreopt to do more
optimizations such as code inlining because instances of
ProtoOutputStream will no longer be escaped from those methods.

Bug: 192412909
Test: atest CtsInputMethodTestCases
Test: Manually verified that IME tracing still works
Change-Id: I7b24aee5428da312972aa86b8658429b421490f8
2021-07-09 09:46:47 -07:00
Yohei Yukawa
3beeb3e3c7 Merge android.util.imetracing into com.android.internal.inputmethod
This CL renames classes related to IME tracing as follows

 * android.util.imetracing.ImeTracing
     => com.android.internal.inputmethod.ImeTracing
 * android.util.imetracing.ImeTracingClientImpl
     => com.android.internal.inputmethod.ImeTracingClientImpl
 * android.util.imetracing.InputConnectionHelper
     => com.android.internal.inputmethod.InputConnectionProtoDumper

Other than those renamings, there should be no observable chagnes.

Fix: 175761228
Test: presubmit
Test: Manually verified that IME tracing still works
Change-Id: I6518d946e1832037f240f57aa900d3447083f1fa
2021-07-09 09:46:36 -07:00
Rob Carr
e65b5f1ef4 Merge "ViewRootImpl: Fix issue with early draw report in seamless rotation" into sc-dev am: 5f28230d34 am: 2aad6f2824
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15235723

Change-Id: I34a592fdf939dbdad6fdf3cf16dfc9a14cafcaef
2021-07-09 03:08:43 +00:00
Rob Carr
4718d33ee0 Merge "ViewRootImpl: Fix issue with early draw report in seamless rotation" into sc-dev am: 5f28230d34
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15235723

Change-Id: I49ddbea622e2ff431d86716bf29384e8b8ac09db
2021-07-09 02:55:26 +00:00
Rob Carr
5f28230d34 Merge "ViewRootImpl: Fix issue with early draw report in seamless rotation" into sc-dev 2021-07-09 02:28:27 +00:00
Robert Carr
a93fcc9e33 ViewRootImpl: Fix issue with early draw report in seamless rotation
When we receive RELAYOUT_RES_BLAST_SYNC from the WindowManager, we
trigger reportNextDraw, incrementing the pending draw count by one.
At the moment we unfortunately do this after dispatching callbacks
to SurfaceView. In the span of these callbacks, SurfaceView may
increment and decrement pending draw count, once it reaches zero
we will notify the WM of draw early, terminating the sync operation
without ever waiting for the ViewRootImpl to draw. By processing
RELAYOUT_RES_BLAST_SYNC before emitting the SurfaceView callbacks
we can avoid this issue.

Bug: 191921061
Test: Existing tests pass
Change-Id: I2f1096c9cdc79b89413c3f0bfd9b3054ef45f2d2
2021-07-08 13:23:33 -07:00
Evan Rosky
38fd37d465 Merge "Hook up split-launch to legacy transition system" into sc-v2-dev am: 5b003d97e8 am: 884bd51e3a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15138014

Change-Id: Iac1f788b593b94b552049575d8e5811c8e75a40c
2021-07-08 18:29:07 +00:00
Evan Rosky
5b003d97e8 Merge "Hook up split-launch to legacy transition system" into sc-v2-dev 2021-07-08 18:10:40 +00:00
Vishnu Nair
9cb7227cb4 Merge "SurfaceControl: Query native object for transform hint" into sc-dev am: 07576112d9 am: 022db9f377
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15191721

Change-Id: I157a45b4c55da00014efaaf3a1df48784da83f90
2021-07-08 16:05:25 +00:00
Evan Rosky
5ca3820ae6 Hook up split-launch to legacy transition system
Part 1 of hooking up stage-split to legacy stuff. This
actually routes the legacy remoteAnimation through shell
in order to gather the dividerbar and interract with the
WindowProcessController

Bug: 192279476
Test: atest WindowOrganizerTests.
      use SPLIT_SELECT to launch 2 apps in split and observe.
Change-Id: I4f8802e6eb33f068fae0e4b3c12942bea76e332b
2021-07-08 09:02:59 -07:00
Vishnu Nair
682565243f Merge "SurfaceControl: Query native object for transform hint" into sc-dev am: 07576112d9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15191721

Change-Id: I5830ac71715a1b5c6a32033a2641ca91323be20d
2021-07-08 15:57:11 +00:00
Vishnu Nair
07576112d9 Merge "SurfaceControl: Query native object for transform hint" into sc-dev 2021-07-08 15:45:31 +00:00
John Reck
cef93afaf1 Merge "Reduce number of weakrefs per frame" into sc-dev am: a8bb119574 am: fda098eade
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15226230

Change-Id: I07f4fe656f57204c99ff0a3179e57f7143da0aa4
2021-07-08 15:35:51 +00:00
John Reck
c2697f38cc Merge "Reduce number of weakrefs per frame" into sc-dev am: a8bb119574
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15226230

Change-Id: Id8a534f1b04e1e09eb6ebd3f1d4170ddaab7115f
2021-07-08 15:23:15 +00:00
Tiger Huang
b4eac9b5d6 Use the real behavior to decide the animation
If the appearance or the behavior are not controlled by APIs,
InsetsController will still return the default values, but the
internal logic will access the real value.

Fix: 192635471
Test: Open an app which hides system bars with
      SYSTEM_UI_FLAG_IMMERSIVE_STICKY, but not
      BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE.
Change-Id: I1c2f947e3707fcb4c151c1ad19c9cd16527e11d9
2021-07-08 17:32:28 +08:00
Joanne Chung
044c1bc50d Update deprecated Preconditions.checkNotNull with Objects.requireNonNull.
Bug: 179352338
Test: manual
Test: atest CtsAutoFillServiceTestCases
Test: atest CtsVoiceInteractionTestCases
Test: atest CtsTextClassifierTestCases
Test: atest CtsContentCaptureServiceTestCases

Change-Id: Id66bacddad4b9f9178326fd97d0cadc3f23a594c
2021-07-07 23:49:45 +00:00
John Reck
b7039c6aa5 Reduce number of weakrefs per frame
Disable end-to-end input latency metric to reduce the
number of JNI WeakGlobalRef acquires per-frame.

Bug: 189738006
Test: Observe trace section no longer appears in calculator
Change-Id: I062dad8e7cec93cca5599e51d2b0b1a1b6e39a07
2021-07-07 19:18:34 -04:00
Yinglei Wang
013065b9b1 Revert "Update a11y focused virtual node properly"
This reverts commit 3658233fe0.

Reason for revert: recreate a11y focused virtual node when findFocus in ag/15217842

Change-Id: Ieae86d0b4cbbb9211b23598c3a2e80bfc1632112
2021-07-06 20:59:11 +00:00
Charles Chen
eb07884f01 Send DA's config directly when attaching to DA
WindowContext relies on WindowTokenClient#onConfigurationChanged after
calling WMS#attachWindowContextToDisplayArea.
However, it took some time to wait for onConfigurationChanged callback
from the server side so that we may get a stale value right after
creating WindowContext.
This confuses developers especially when the foreground activity is in
size compat mode or freeform because the process config is overridden
by activity's config.
This CL makes #attachWindowContextToDisplayArea return DA's configuration
and applies to WindowContext direcly.
It also benefits WindowProviderService because it can obtain DA's
 configuration before onCreate() based on [1] and this CL.

Bug: 190019118
Bug: 190745506
Test: manual - 1. launch an Activity in size compat mode
               2. create a WindowContext and verify if WindowMetrics
                  matches DA bounds.
Test: atest WindowContextTest WindowContextTests
Test: atest WindowContextControllerTest ContextGetDisplayTest
[1]: dd4a748af0

Change-Id: I8dd3987b731662502bc01e9d2ed67e718ada5f46
2021-07-05 14:02:02 +08:00
yingleiw
be503699e2 recreate a11y focused virtual node when findFocus
Added documentation that ViewRootImpl#mAccessibilityFocusedVirtualView
may be stale except for bounds and sourceNodeId. And recreate
the node when a11y services calls findFocus.

Checked other usages of mAccessibilityFocusedVirtualView(including
getter method) and verified they are OK.

Fix: b/192706021

Test: tested with Jetpack Compose progress indicator and radio button.
Without Jetpack Compose side workaround, this fix works well with
talkback google3 head.

Change-Id: I40c42011512e3d1fccd1ae8a16a62cbf500cf2ad
2021-07-02 20:20:05 -07:00
Yinglei Wang
b307d06233 Merge "Allow app usage of AccessibilityInteractionClient#getInstance and clearCache before T" into sc-dev am: 69d877992b am: 08f347af5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15181867

Change-Id: I2ef95de269691c67a0cfc1b5abee4bd6969768ad
2021-07-02 21:27:49 +00:00
Yinglei Wang
1943d7c240 Merge "Allow app usage of AccessibilityInteractionClient#getInstance and clearCache before T" into sc-dev am: 69d877992b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15181867

Change-Id: I9dbabae9045f67d595836608de23065030ee17ba
2021-07-02 21:27:43 +00:00
Yinglei Wang
69d877992b Merge "Allow app usage of AccessibilityInteractionClient#getInstance and clearCache before T" into sc-dev 2021-07-02 21:21:33 +00:00
Vishnu Nair
f4cc95956c SurfaceControl: Query native object for transform hint
When a new SurfaceControl was created, the java object's transform
hint was not updated. This created a mismatch between the java and
native objects resulting in the client getting an incorrect transform
hint. Fix this by making the native object the source of truth for
transform hints.

Test: in landscape mode, dismiss apps and check launcher does not reject buffers
Bug: 191841127

Change-Id: Icc87b8cf8158eedb87eea886392a0460a76c6443
2021-07-02 13:08:33 -07:00
Mark Renouf
6845b83335 Merge "Revert "Revert "Fix mPositionInWindow to not use global coords""" into sc-dev am: 2fe11f121d am: 098aa09607
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15172668

Change-Id: I8274b290e6271a0d418ef4e59b31f0d2a736ad90
2021-07-02 19:22:27 +00:00
Mark Renouf
f5ff9a0425 Merge "Revert "Revert "Fix mPositionInWindow to not use global coords""" into sc-dev am: 2fe11f121d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15172668

Change-Id: I4dcb7a6bca2038484f5399dc4d3871aff2fb5352
2021-07-02 19:06:15 +00:00
Mark Renouf
2fe11f121d Merge "Revert "Revert "Fix mPositionInWindow to not use global coords""" into sc-dev 2021-07-02 18:54:07 +00:00
yingleiw
81f366110d Allow app usage of AccessibilityInteractionClient#getInstance and clearCache before T
These are needed to have a workaround fix for a11y cache filled with
stale data before android T.

NoNonSdkCheck: set maxTargetSdk to S in UnsupportedAppUsage is not allowed yet.

Bug: b/192110374

Test: it builds fine.
Change-Id: Iaa0f68b2b8e4702f6b638cb3060714a22850af7e
2021-07-02 16:58:59 +00:00
TreeHugger Robot
3760ff5953 Merge "Switch back to sync IInputMethodManager" into sc-dev am: 4e944d4634
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15176334

Change-Id: I98fc3154d5384ac6c0d75428c059d6fe8e4c7b68
2021-07-02 15:37:19 +00:00
TreeHugger Robot
4e944d4634 Merge "Switch back to sync IInputMethodManager" into sc-dev 2021-07-02 15:22:21 +00:00
Yohei Yukawa
4f904fac9d Merge "Switch back to sync IInputMethodManager" 2021-07-02 14:28:49 +00:00
Yohei Yukawa
9dde701446 Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
Merged-In: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:06:07 +00:00
Yohei Yukawa
662b48b72d Switch back to sync IInputMethodManager
This CL logically reverts recent CLs [1][2][3][4][5][6][7][8][9] to
switch back to the previous sync IPC approach in IInputMethodManager
except for the following two IPCs.

 * reportPerceptibleAsync
 * removeImeSurfaceFromWindowAsync

Reason for revert:
We need more time to understand its performance implications.

 [1]: If4b40244a2e0e3b11c38c1da9340ba8e5166ad64
      b9590fa1e1
 [2]: If79e063641a01b325c63eb9f871f5b992d7c0b72
      5a5648dcb5
 [3]: I1547b98b2aacf764e33aadc9ab784f2013f58f2f
      d833f0dab4
 [4]: I646ef4ae0570aae1812ea267f309441fdec6938d
      38fd020616
 [5]: Iaa63e01453da4ff0e3f446eac036b3be3180cb73
      4a820ccc41
 [6]: Id516fd1c961f43ac3e139c88d7ed004c188d458b
      0a32fd21ef
 [7]: Icb396ae5d74060af69c4ecb16723b2e37b9f2067
      c4663ba6a9
 [8]: I3eafbc28ed3acf3ba859885bf201cb06b3149b94
      f226a79fee
 [9]: Ic584203c1221fbae17f5e2d8f09e3992df061646
      5e2d9f271d

Bug: 163453493
Bug: 174892351
Fix: 190486491
Test: atest CtsInputMethodTestCases
Change-Id: If16ac0de536d9089eb04f6e07b1ee47378124658
2021-07-02 07:05:45 +00:00
Joanne Chung
12e3576e13 Merge "Fix translation reference gone problem." into sc-dev am: 3d088cbb09 am: be58916c53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15172174

Change-Id: I2897d98c52076e5010ce9545a4d164a380cfbfaa
2021-07-02 04:23:52 +00:00