Commit Graph

18826 Commits

Author SHA1 Message Date
Peter Kalauskas
d8726e6bfb Merge "Invalidate outline only if provider changes" 2022-06-14 06:06:45 +00:00
Chavi Weingarten
d4d92418a5 Merge "Make sure VRI waits for SV to draw before report" into tm-dev am: 4c2c7ebfaa am: 1ee9e52fe4 am: acc2838241 am: f903fa8445
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18820396

Change-Id: Iad402c861add070289d2199dfdc239172b8e1386
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-14 00:29:58 +00:00
Chavi Weingarten
acc2838241 Merge "Make sure VRI waits for SV to draw before report" into tm-dev am: 4c2c7ebfaa am: 1ee9e52fe4
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18820396

Change-Id: I8284e93eeac89f6693ccef251ceda92db41d0b85
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 23:38:17 +00:00
Peter Kalauskas
f8631c6ddc Invalidate outline only if provider changes
Test: android.uirendering.cts.testclasses.ViewClippingTests
Bug: 231054525
Change-Id: Ibeb4e4a0b44b894fb98748423903b4e544c3ccc3
2022-06-13 22:38:15 +00:00
Yohei Yukawa
3e56ef4e06 Merge "Move *InlineSuggestions* to com.android.internal.inputmethod" 2022-06-13 15:10:26 +00:00
Tiger Huang
e8602a37ab Merge "Fix InsetsState#calculateUncontrollableInsetsFromFrame" into tm-qpr-dev am: 12b430a7a0 am: 7fde64b47a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18670487

Change-Id: I4d796620f5c9552ba504ec43eb18f2cd74283308
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-13 13:05:21 +00:00
Tiger Huang
12b430a7a0 Merge "Fix InsetsState#calculateUncontrollableInsetsFromFrame" into tm-qpr-dev 2022-06-13 12:28:18 +00:00
Yunfan Chen
7ced0e2438 Refine the provide insets parameters
There're 3 different parameters trying to affect the insets provided by
a window and can be set independently but are related. This change will
make a new class InsetsFrameProvider to let the window set all the
information needed for the insets at the same place.

Besides, this change also extends the insets calculation logic to
support more use cases. With this, the bars can provide insets outside
of its window frame as well.

Test: atest DisplayPolicyLayoutTests
Bug: 161689946
Bug: 232044523
Merged-In: I7059b3a222745818b6852a288416e197e2afd7b2
Change-Id: I7059b3a222745818b6852a288416e197e2afd7b2
2022-06-13 03:13:37 +00:00
Yohei Yukawa
bd8375b35a Move *InlineSuggestions* to com.android.internal.inputmethod
This CL moves 4 files that match *InlineSuggestions* from

  com.android.internal.view

to

  com.android.internal.inputmethod

as they are basically used only by IME classes (and Autofill).

Hopefully this gives better code organization and maintainance.

This is a mechanical refactoring of internal details.  There should be
no user/developer observable behavior change in this CL.

Bug: 234882948
Test: presubmit
Change-Id: Iac696ae501953ab6a90d99112a62221454cd76e4
2022-06-10 11:35:05 -07:00
Yohei Yukawa
fd1580e341 Move IInputMethodSession to com.android.internal.inputmethod
This CL Moves IInputMethodSession from com.android.internal.view to
com.android.internal.inputmethod to be consistent with other
IME-related files.

This CL also moves IInputSessionCallback to
com.android.internal.inputmethod with renaming it to
IInputMethodSessionCallback for consistency.

This is just a renaming CL of implementation details.  There should be
no user/developer observable behavior change in this CL.

Bug: 234882948
Test: presubmit
Change-Id: I87495cbd482dd55005ac8d948f57f32bb016c7d6
2022-06-10 10:51:07 -07:00
chaviw
783ae3c7d9 Make sure VRI waits for SV to draw before report
VRI is not currently waiting for SV to draw since SV may start its draw
before VRI opened the SyncSet. If that happens, VRI will not include SV
in its SyncSet and report draw finished even if SV is not complete.

This fix has SV create its own SyncSet when redrawNeeded. Then if VRI
creates a sync, SV will merge its own SyncSet into that one. If SV
already finished drawing, then nothing will get merged, but it means SV
is ready already. If SV is not finished, VRI will now also wait for SV's
draw to finish before calling finishDraw.

Test: Long delay in surfaceRedrawNeededAsync
Test: SurfaceSyncerTest
Bug: 230998394

Change-Id: I44331b8f54951e6dc633a4845bbf690abde0f95e
2022-06-10 12:15:00 -05:00
Yunfan Chen
bcadfd2476 Refine the provide insets parameters
There're 3 different parameters trying to affect the insets provided by
a window and can be set independently but are related. This change will
make a new class InsetsFrameProvider to let the window set all the
information needed for the insets at the same place.

Besides, this change also extends the insets calculation logic to
support more use cases. With this, the bars can provide insets outside
of its window frame as well.

Test: atest DisplayPolicyLayoutTests
Bug: 161689946
Bug: 232044523
Change-Id: I7059b3a222745818b6852a288416e197e2afd7b2
2022-06-09 15:20:30 +09:00
Chavi Weingarten
72d45fcfbf Merge "Report sync complete when VRI won't draw" into tm-dev am: 72a26f7912 am: c3cdcd3bf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18775294

Change-Id: I21adcf3f66f703b0069a2adb804bdf0cd2347e55
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 21:58:29 +00:00
Chavi Weingarten
78b2a87d6b Merge "Report sync complete when VRI won't draw" into tm-dev am: 72a26f7912 am: 8ebe22e33b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18775294

Change-Id: I6cd47246a4046e634e1a5189cf15beab41c17a6c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 21:58:22 +00:00
Chavi Weingarten
72a26f7912 Merge "Report sync complete when VRI won't draw" into tm-dev 2022-06-07 21:14:42 +00:00
Chet Haase
f6541ab73e Pause animators when app is not visible am: b99cc5b4c8 am: f2e66fa4ed
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528824

Change-Id: I4a220654954199c26f29a93d8afc3ad8a448547e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 20:28:07 +00:00
Chet Haase
f2e66fa4ed Pause animators when app is not visible am: b99cc5b4c8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18528824

Change-Id: I2b041e112cfa55949a9d3f753388de3536dbd33a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 20:06:35 +00:00
Steven Terrell
a4ac1574bd Merge changes from topic "stop-leaked-animators" into tm-dev
* changes:
  Use System Property to Control Animator Pausing
  Disable debug logging in AnimationHandler
  Allow system to disable behavior of pausing animators for bg apps
  Pause animators when app is not visible
2022-06-07 19:49:48 +00:00
chaviw
71e6329765 Report sync complete when VRI won't draw
There is some checks in performDraw that will skip drawing. For example,
if the display is off or if there's no view. In those cases, we don't
want to wait for a frame since there will be none and instead
immediately report back that the sync for this VRI is complete.

Test: Repro from bug
Fixes: 234426290
Change-Id: I7d5993f9980b9cdafc99a5712e74a4de704aef47
2022-06-07 12:02:07 -05:00
Tiger Huang
2f6389cd28 Merge "Don't set extreme values of Integer to safe bounds" into tm-dev am: 0a194469f0 am: 7f00295029
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18746081

Change-Id: I774a3bb0757ee8e59897eea05b0bce26e2f14877
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 12:41:43 +00:00
Tiger Huang
4a8e0a390c Merge "Don't set extreme values of Integer to safe bounds" into tm-dev am: 0a194469f0 am: 1c41f4ef93
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18746081

Change-Id: Ie84a36ce9365f009db706f7e664a12f8c8f38056
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-07 12:22:48 +00:00
Yohei Yukawa
e893ec4f8d Rename IInputContext to IRemoteInputConnection
IInputContext is the IPC interface name used behind InputConnection,
which was named in the initial development of IME API for Android 1.5.

To make it more descriptive and consistent with other classes such as
RemoteInputConnection, let's rename it to IRemoteInputConnection.

This CL also renames

  IInputContextInvoker

to

  IRemoteInputConnectionInvoker

for consistency.

This is a rename of internal IPC interface.  There should be no
user/developer observable impact.

Bug: 234882948
Test: presubmit
Change-Id: Iae82d5a26f0746161c2bf91a421b97f0f238aafd
2022-06-06 12:48:14 -07:00
Tiger Huang
32dd1b916a Don't set extreme values of Integer to safe bounds
This is to prevent getting unexpected results while calculating the
width or height of the rectangle, due to the overflow.

This CL defines the borders of the window layout with large enough
integers, which are also the borders of the safe bounds.

Fix: 227276622
Test: atest ConfigurationScreenLayoutTest#testScreenLayout
Change-Id: Iee14e6de48f57be4999f64dbdce01815de88a9df
2022-06-06 13:02:59 +00:00
TreeHugger Robot
bf58690832 Merge "Move IInputMethodClient to com.android.internal.inputmethod" 2022-06-06 06:12:57 +00:00
Yohei Yukawa
3221237629 Move IInputMethodClient to com.android.internal.inputmethod
Bug: 234882948
Test: presubmit
Change-Id: I7c11c9613732c3faa722938c2c4761868444cd42
2022-06-03 17:27:34 -07:00
TreeHugger Robot
31604826e2 Merge "Fix modulo div by 0 in Choreographer." into tm-dev am: 6dadf45f60 am: 6ac56d2506
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18718035

Change-Id: I3eff3b1602c5d0f71bb6d4d33158743ed292d148
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 00:13:35 +00:00
TreeHugger Robot
8e8c28eea2 Merge "Fix modulo div by 0 in Choreographer." into tm-dev am: 6dadf45f60 am: 994032fc1f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18718035

Change-Id: I2f73342ddf5ab1e6dfafb2050eb90766eb1b1de7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 00:12:58 +00:00
TreeHugger Robot
52dc6f568d Merge "Add transition timestamp to AccessibilityWindowInfo" 2022-06-03 20:50:17 +00:00
TreeHugger Robot
6dadf45f60 Merge "Fix modulo div by 0 in Choreographer." into tm-dev 2022-06-03 19:03:33 +00:00
chaviw
e777b75d4c Convert to using inputConfig for clone info in WindowInfo
Remove explicit isClone flag and add CLONE to InputConfig

Test: Builds
Bug: 230300971
Change-Id: Iced894472c75bf2ef22618b9e7485d1978d88be2
2022-06-02 17:16:43 +00:00
TreeHugger Robot
2b27ef0a4b Merge "Make GPU duration metrics more accurate for Vulkan" into tm-dev am: 9bcdb76b98 am: 258905ed7e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18639113

Change-Id: Ia75d3e4724d5e91b0ca5cf19d1b2bf402629387f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 06:43:38 +00:00
TreeHugger Robot
788f36bb4f Merge "Make GPU duration metrics more accurate for Vulkan" into tm-dev am: 9bcdb76b98 am: 445ab1404f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18639113

Change-Id: I25c01e18201f8e147e23049242c9bf281a1bfaf4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-02 06:36:09 +00:00
TreeHugger Robot
9bcdb76b98 Merge "Make GPU duration metrics more accurate for Vulkan" into tm-dev 2022-06-02 06:12:33 +00:00
Rachel Lee
2c303b3f51 Fix modulo div by 0 in Choreographer.
Bug: 234483897
Test: atest ChoreographerTest
Change-Id: I7d7766f6ea120109490d307e971a3da80a3d92ad
2022-06-01 15:24:05 -07:00
Alec Mouri
3afb3972f4 Make GPU duration metrics more accurate for Vulkan
In the Vulkan pipeline, the GPU start time was measured to be when
swapBuffers starts. But the command queue has already been submitted at
this point, which means that the GPU work would already have begun. This
means that it's possible to measure a negative time since for very light
GPU workloads, the GPU fence can fire prior to CPU making it to
swapBuffers().

To compensate, instead measure from after skia completed submitting GPU
commands, until the GPU fence fires. Since it is theoretically possible
for GPU work to complete if the render thread gets descheduled
immediately after submitting the GPU, we also add some clamping to
ensure that the duration from command submission -> completion of GPU
work is nonnegative.

Bug: 230713131
Test: atest android.view.cts.FrameMetricsListenerTest
Change-Id: Ia30b7732eaab71e4e29766f788d5cd94ec63c38a
2022-06-01 21:18:30 +00:00
Chavi Weingarten
beab74891e Merge "Remove lock when calling Surface.destroy" into tm-dev am: 3868362584 am: 9eb9c476f3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18674393

Change-Id: I729b871bde2b714f8fb85795af0f3b6aeabfee34
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 17:27:04 +00:00
Chavi Weingarten
66c6130598 Merge "Remove lock when calling Surface.destroy" into tm-dev am: 3868362584 am: 42dee93b53
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18674393

Change-Id: I617601e94a863ad105a94abd1802b630ff3d3c5c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 17:26:43 +00:00
Chavi Weingarten
3868362584 Merge "Remove lock when calling Surface.destroy" into tm-dev 2022-06-01 16:36:34 +00:00
Pablo Gamito
eef429affc Merge "Revert "Revert "Add ability to trace shell transitions""" into tm-qpr-dev am: 9fd0212e95 am: ddffd55d64
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18619887

Change-Id: I45601515d0184483aeefa57a8a344831c96bb97e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 12:41:50 +00:00
Pablo Gamito
9fd0212e95 Merge "Revert "Revert "Add ability to trace shell transitions""" into tm-qpr-dev 2022-06-01 12:19:49 +00:00
TreeHugger Robot
0232f47db6 Merge "Log why presentation was not shown" into tm-dev am: bd26701a6b am: e25d1148e7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18519537

Change-Id: I6a7a3a46319f614e4a13cf73ffdd328714970c08
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 09:17:05 +00:00
TreeHugger Robot
bd26701a6b Merge "Log why presentation was not shown" into tm-dev 2022-06-01 08:04:53 +00:00
Kate Xu
713a6d84ab Merge "Log why presentation was not shown" 2022-06-01 04:36:43 +00:00
Ryan Lin
a4c2f638fe Merge "Drop the cloned windows from visible window list" into tm-dev am: 8ef351123b am: 9896fe1981
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18659076

Change-Id: Ic304c22ababb1c256d877623cbbc142cc342811f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 02:22:16 +00:00
Ryan Lin
e49dcfca1b Merge "Drop the cloned windows from visible window list" into tm-dev am: 8ef351123b am: 2684945fb5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18659076

Change-Id: Ib2521d2807afeeb61614532957caa48c82785d7b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-01 01:52:06 +00:00
Ryan Lin
8ef351123b Merge "Drop the cloned windows from visible window list" into tm-dev 2022-06-01 01:29:36 +00:00
skxu
296065496f Log why presentation was not shown
Fixes: 219613425
Test: b/233833739
Change-Id: Ic95cc69b912e8144726124ebc8355c2d1e24079e
2022-06-01 00:43:54 +00:00
TreeHugger Robot
05ed701655 Merge "Get velocitytracker strategy from InputManager" 2022-06-01 00:24:55 +00:00
skxu
48a5cbb2d6 Log why presentation was not shown
Fixes: 219613425
Test: b/233833739
Change-Id: Ic95cc69b912e8144726124ebc8355c2d1e24079e
Merged-In: Ic95cc69b912e8144726124ebc8355c2d1e24079e
2022-06-01 00:10:02 +00:00
chaviw
9e3cd0533f Remove lock when calling Surface.destroy
Surface already has a lock on the native object so it's safe to call
destroy without holding additional locks. This also fixes ANR issues
where an app is still attempting to render when the window is destroyed.

Test: App from bug doesn't ANR
Bug: 234006724
Change-Id: I0d323c03f299e5857d1950870498f3182d019924
2022-05-31 13:48:56 -05:00