Commit Graph

15104 Commits

Author SHA1 Message Date
Charles Chen
82a951abc3 Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev am: 8deb612a14 am: f9ccadb06d am: 2712b5e401 am: 718528f4bb
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004931

Change-Id: I669e79f51cd8a2390c53308b30cbe1d94a3b39c5
2020-07-02 00:28:39 +00:00
Charles Chen
2712b5e401 Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev am: 8deb612a14 am: f9ccadb06d
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004931

Change-Id: I1d815ad1451ff3de66fd7d1fe7d4c1027f73b0d6
2020-07-02 00:00:48 +00:00
Charles Chen
f9ccadb06d Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev am: 8deb612a14
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12004931

Change-Id: Ied208126c1c21f736f07d4d7f24cb14c3a83c280
2020-07-01 23:42:26 +00:00
Charles Chen
8deb612a14 Merge "Revert "Revert "Enable IMS and its config context to obtain UI component""" into rvc-dev 2020-07-01 23:21:51 +00:00
John Reck
ee26d1ef65 Merge "Remove legacy callDrawGlFunction2 from HWUI" 2020-06-30 19:09:37 +00:00
Nikolas Havrikov
7189e147e5 Merge "Use ParceledListSlice in a generic manner" 2020-06-30 17:22:03 +00:00
Nikolas Havrikov
24b3591d95 Use ParceledListSlice in a generic manner
Test: built locally

Change-Id: Ib5bc0227f198e7b3c416e8beb423e3541e37f358
2020-06-30 13:36:04 +02:00
Rob Carr
1873699f32 Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into rvc-dev am: 9464091e72 am: 7f46d57c67 am: 3da075357f am: 6a6439738a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12010092

Change-Id: Ic25f326eed84a153a02f27f4e9e88b640bf581cf
2020-06-29 22:37:16 +00:00
Rob Carr
6a6439738a Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into rvc-dev am: 9464091e72 am: 7f46d57c67 am: 3da075357f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12010092

Change-Id: I47c5a466c839630b7666ac4ddc4bebae6d561dfd
2020-06-29 22:22:55 +00:00
Rob Carr
91ecb004c3 Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into rvc-dev am: 9464091e72 am: 7f46d57c67
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12010092

Change-Id: I43f2bd15f8c215dcd6f21541179d3c85140fe3ed
2020-06-29 21:56:16 +00:00
Rob Carr
f1102c8c5d Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into rvc-dev am: 9464091e72
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12010092

Change-Id: Icee6625c7731850fce224e6d693d43244968ca98
2020-06-29 21:48:26 +00:00
Rob Carr
9464091e72 Merge "SurfaceView: Clean up deferred-destroy-surface from UI thread" into rvc-dev 2020-06-29 21:42:03 +00:00
Charles Chen
ba4ffa4a6d Revert "Revert "Enable IMS and its config context to obtain UI component""
Test: atest StrictModeTest
Bug: 157027563
Bug: 159795597
Change-Id: I2a1b3fefa0bd82eeaa507c08fc4a79fc9f4391c5
2020-06-29 14:27:08 +00:00
TreeHugger Robot
f4db5aa9bd Merge changes I74d8f555,I7521a5a1 into rvc-dev am: b5d9c88ddd am: 0cfb45900e am: 751c2fe827 am: c7d4699c50
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11959351

Change-Id: I44487d4d0e911c5ad882952002ce669dc4eca2ed
2020-06-27 02:38:36 +00:00
Jorim Jaggi
7a9fa4689a Merge "Pass in callsite of SurfaceControl constructor explicitly (1/3)" into rvc-dev am: 37cf2279c9 am: 3f8fc80e42
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920862

Change-Id: I2f30c74dab0cf842a5e06257c357cdb23798397a
2020-06-27 00:28:22 +00:00
Jorim Jaggi
41bd44e606 Merge "Pass in callsite of SurfaceControl constructor explicitly (1/3)" into rvc-dev am: 37cf2279c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920862

Change-Id: I19b6f83b3777bfeccbe90f1c531efcc59e41f54e
2020-06-27 00:14:24 +00:00
Jorim Jaggi
37cf2279c9 Merge "Pass in callsite of SurfaceControl constructor explicitly (1/3)" into rvc-dev 2020-06-26 23:58:17 +00:00
John Reck
aa4c982294 Remove legacy callDrawGlFunction2 from HWUI
Bug: 151439970
Test: CtsUiRenderingTestCases passes

Change-Id: I1c29df17bb6e8b078467edf73cb3547db6948cdd
2020-06-26 13:49:05 -07:00
Robert Carr
9a808a2ee2 SurfaceView: Clean up deferred-destroy-surface from UI thread
We utilize mTmpTransaction without locking from the main thread. The
callback info inside the transaction stores an sp to the SurfaceControl.
If we apply the Transaction from two threads independently we may
implicitly call reset() on the same sp instance twice in an overlapping
fashion. While the reference count is itself atomic, that wont stop us
from decrementing it twice here, when we only had one reference.
This leads to an early free and a crash later.

Bug: 159333209
Test: Existing tests pass
Change-Id: I898bef0b6b8c1cf34891410bbadf63fe2f840697
2020-06-26 18:47:28 +00:00
Jorim Jaggi
543db32125 Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.

Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
2020-06-26 13:40:07 +00:00
Jorim Jaggi
d42ab1b938 Pass in callsite of SurfaceControl constructor explicitly (1/3)
Creating a new Throwable (and filling in the stack trace) can take
up to 150us. Since we do this on the critical path when sending
over SurfaceControl via binder multiple times, this is too much.
Instead, add an option to pass in callsite manually.

Bug: 159056748
Change-Id: I46c339c15a07192d61c4c546e46f260684a47120
Merged-In: I46c339c15a07192d61c4c546e46f260684a47120
Exempt-From-Owner-Approval: Large scale refactor
2020-06-26 15:35:23 +02:00
TreeHugger Robot
751c2fe827 Merge changes I74d8f555,I7521a5a1 into rvc-dev am: b5d9c88ddd am: 0cfb45900e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11959351

Change-Id: I395aa58786509e7da781196746ba19434419802c
2020-06-26 11:03:34 +00:00
TreeHugger Robot
962f4bd22c Merge changes I74d8f555,I7521a5a1 into rvc-dev am: b5d9c88ddd
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11959351

Change-Id: I976e546bad5429ea1c14ce7134b7c671f24a8bc0
2020-06-26 10:51:13 +00:00
TreeHugger Robot
b5d9c88ddd Merge changes I74d8f555,I7521a5a1 into rvc-dev
* changes:
  Prevent ANR if window is stopped
  Isolate batched input scheduling logic.
2020-06-26 10:40:27 +00:00
Siarhei Vishniakou
48f110ec7b Prevent ANR if window is stopped
When an activity is stopped, there could still be some pending events in
the inputconsumer due to batching. Those events are supposed to be
handled when choreographer's 'CALLBACK_INPUT' occurs, but this will
never happen if the window is stopped.

There are two possible ways these events can occur:

1. The last input event happens before onStop, but at that point,
choreographer will already stop sending callbacks. The solution to this
is to add a call to "consumeImmediately" inside setWindowStopped.

2. Input events come in after window has already been stopped. At that
point, the callback we posted in 1. would already have executed (and
found that there's no events). The solution to this is to immediately
consume all input if mStopped=true. We do this by switching to
"unbuffered" mode for simplicity.

This is reproducible via monkey testing, but it's plausible that such
race condition can occur in real world usage.

Test: adb shell monkey --throttle 40 50000
Bug: 159239700
Change-Id: I74d8f55503ef7df2fd01931afb362d68e5026e86
2020-06-25 19:09:53 +01:00
TreeHugger Robot
438fd755bf Merge "Fix issue in InsetsState.set" into rvc-dev am: 2a60031116 am: 284216ee00 am: 9d3f7afd4b am: 2605e39074
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987763

Change-Id: I7fe83311fa14f2178ff265675c8fa79ddad62d46
2020-06-25 18:09:21 +00:00
Michael Wright
17761fff2a Isolate batched input scheduling logic.
Having whether something is currently scheduled get modified in the
actual processing logic and away from the scheduling logic makes it
unnecessarily more difficult to reason about.

In this case, we were only checking whether the Choreographer-aligned
runnable was actually scheduled before we'd consume input. When trying
to unbuffer dispatches so that things were no longer
Choreographer-aligned, however, we'd unschedule the that runnable just
before we tried to consume input and hence just before the check . This
meant we never actually consumed the batches until the next one came in
where we would then consume them immediately.  Worse, if another one
never came in then we'd never actually consume the batch.

By removing the scheduling logic from the processing logic we avoid this
situation. Now only the schedule, unschedule, and actual runnable logic
touch their own scheduled state, so that we don't have to consider the
two pieces of logic together except in isolated places.

Bug: 158540186
Bug: 159239700

Test: manual, using app that injects unbuffered dispatch requests either
      at ACTION_DOWN or first ACTION_MOVE
Change-Id: I7521a5a16ed52afc41261f501128b5498ea0602c
2020-06-25 19:08:05 +01:00
TreeHugger Robot
9d3f7afd4b Merge "Fix issue in InsetsState.set" into rvc-dev am: 2a60031116 am: 284216ee00
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987763

Change-Id: I141fea0bc50ff5ae6c777a8c89407f4b003e4f7b
2020-06-25 16:57:07 +00:00
TreeHugger Robot
284216ee00 Merge "Fix issue in InsetsState.set" into rvc-dev am: 2a60031116
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11987763

Change-Id: I31d6457476face337313c9ef5a7f8f8e5b40f508
2020-06-25 16:41:49 +00:00
Jorim Jaggi
b2410eb4f9 Fix issue in InsetsState.set
Test: InsetsStateTest
Fixes: 159610005
Change-Id: I7e64c4f7d93caae13b43f595a7ec8af901316399
2020-06-25 12:34:03 +00:00
TreeHugger Robot
99b1d3da0f Merge "Revert "Enable IMS and its config context to obtain UI component"" into rvc-dev am: 9e7c46190a am: 213be87921 am: 3243b12ac8 am: 8a7ed76dcf
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11988595

Change-Id: Ic0648b1764161291c083e83662fcf0c2dd856396
2020-06-25 01:16:21 +00:00
TreeHugger Robot
3243b12ac8 Merge "Revert "Enable IMS and its config context to obtain UI component"" into rvc-dev am: 9e7c46190a am: 213be87921
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11988595

Change-Id: Id810ddb30a51d5e5a4013f3516d812c5cf2923bb
2020-06-25 00:55:00 +00:00
TreeHugger Robot
213be87921 Merge "Revert "Enable IMS and its config context to obtain UI component"" into rvc-dev am: 9e7c46190a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11988595

Change-Id: I120e7328f1fe8a72292f73ca07320d02b5587554
2020-06-25 00:47:34 +00:00
TreeHugger Robot
9e7c46190a Merge "Revert "Enable IMS and its config context to obtain UI component"" into rvc-dev 2020-06-25 00:41:07 +00:00
Alistair Delva
71b8a0456c Revert "Enable IMS and its config context to obtain UI component"
Revert "Verify IMS to get display and WM"

Revert submission 11823238-ims_ui_context

Reason for revert:
Broke the following tests:
android.os.cts.StrictModeTest#testIncorrectContextUse_GetDisplay
android.os.cts.StrictModeTest#testIncorrectContextUse_GetSystemService
android.os.cts.StrictModeTest#testIncorrectContextUse_GetViewConfiguration
But was submitted with a bypass.

Reverted Changes:
I688b46a92:Verify IMS to get display and WM
I172ceb2e1:Enable IMS and its config context to obtain UI com...

Bug: 157027563
Bug: 159795597
Change-Id: Id309faac0ac8f60ee0d92c26767a89f450ddc455
2020-06-24 22:31:53 +00:00
Automerger Merge Worker
67a228259c Merge "Merge "Address missed comments from previous CL" into rvc-dev am: dab5588e84 am: d00340e1a5 am: 439359869f" into rvc-qpr-dev-plus-aosp am: 23c9cc0cb7
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11978216

Change-Id: I6fca331224199adce27ff8b835d4c54c74a112b6
2020-06-24 17:44:39 +00:00
Svetoslav Ganov
842f9e3b31 Merge "Address missed comments from previous CL" into rvc-dev am: dab5588e84 am: d00340e1a5 am: 439359869f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11978216

Change-Id: Ice21ea4808754a69d0c233d2c85669ff2460d2a0
2020-06-24 17:29:30 +00:00
Svetoslav Ganov
fb3d4a242a Merge "Address missed comments from previous CL" into rvc-dev am: dab5588e84 am: d00340e1a5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11978216

Change-Id: I8f4f4623c37a02632f74f3efef6486ce207ec46c
2020-06-24 17:13:36 +00:00
Svetoslav Ganov
9529f00aa7 Merge "Address missed comments from previous CL" into rvc-dev am: dab5588e84
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11978216

Change-Id: I2637826dde356b7604dffa907f4385c7b83a3780
2020-06-24 17:01:41 +00:00
Svetoslav Ganov
3e38462491 Merge "Handle reperenting of InlineContentView" into rvc-dev am: f8b9ddea71 am: a962563758 am: bf50afcb4e am: e6e30d2948
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907687

Change-Id: Id8c4a07af383ef3f58bad760b28fdb5a69dc3e03
2020-06-24 07:22:38 +00:00
Svetoslav Ganov
bf50afcb4e Merge "Handle reperenting of InlineContentView" into rvc-dev am: f8b9ddea71 am: a962563758
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907687

Change-Id: Ia18fc12a4015296d59985b376b159a1560717d90
2020-06-24 06:56:18 +00:00
Svetoslav Ganov
0de1884aef Merge "Handle reperenting of InlineContentView" into rvc-dev am: f8b9ddea71
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11907687

Change-Id: I9b0919075bc6e29cf4beb6d2e92097d74ac4d99b
2020-06-24 06:44:18 +00:00
Svet Ganov
4846803547 Address missed comments from previous CL
bug:153826463

Test: atest android.widget.cts.inline.InlineContentViewTest#testReparenting

Change-Id: Iddb1f4d2e0b7043517616d0ec3678a55f9eda34c
2020-06-24 06:39:28 +00:00
Svetoslav Ganov
f8b9ddea71 Merge "Handle reperenting of InlineContentView" into rvc-dev 2020-06-24 06:28:59 +00:00
Svet Ganov
a5b4990d96 Handle reperenting of InlineContentView
When an inline content view is reparented its surface is
getting offset and not being under the view itelf. This is
because the surface views manage the postion of their
surface and are assuming a location based off the window's
surface position. However after a reparenting the inline
content view's surface position becomes relative to that
of the new parent surface view. For example, two surface
views at position (10, 10) being reparented would reslut
in the surface of the parent being at (10, 10) while the
surface of the child being at (20, 20) while both views
would still be at (10, 10).

To address this we are intecepting when an inline content
view's surface is reparented and get a weak reference to
the view that owns the new parent surface. We then position
the inline content view's surface relative to the view that
owns the new parent surface, i.e. we position the surface
such that its location would not change because of the
fact it is being reparented.

While at this make sure the inline content view is marked
as not important for a11y to ernsure the a11y plugins don't
try to click on the view tree in the app's process but
insted on the views in the remote proccess, i.e. on the
embedded view tree.

bug:153826463

Test: atest android.widget.cts.inline.InlineContentViewTest#testReparenting

Change-Id: I2cff4b88d404a740bc447668e948eabccad084d2
2020-06-24 06:27:17 +00:00
Tiger Huang
0e9974c522 Merge "Disable user animations on insets whose visible frame is empty (refined)" into rvc-dev am: 77190b77f6 am: 4c3dac8019 am: 27a5c4bbf6 am: 8e25a4b574
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11908304

Change-Id: Ia3a523ffc6293d995303378f16589248c1deb652
2020-06-24 04:45:56 +00:00
Charles Chen
98fec6e684 Merge "Enable IMS and its config context to obtain UI component" into rvc-dev am: 8655743001 am: e3138eca89 am: dc26be9316 am: 771804d66e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11818544

Change-Id: Icc576f42e8209c1178013116c2f68e3e66f4a89d
2020-06-24 04:20:44 +00:00
Tiger Huang
27a5c4bbf6 Merge "Disable user animations on insets whose visible frame is empty (refined)" into rvc-dev am: 77190b77f6 am: 4c3dac8019
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11908304

Change-Id: I761b70375b94539dad9771f81397965fff467fb1
2020-06-24 04:20:05 +00:00
Tiger Huang
b6b69b2be2 Merge "Disable user animations on insets whose visible frame is empty (refined)" into rvc-dev am: 77190b77f6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11908304

Change-Id: I26f41c07925b94a5eb06e12ab131896b661c9db4
2020-06-24 04:02:34 +00:00
Tiger Huang
77190b77f6 Merge "Disable user animations on insets whose visible frame is empty (refined)" into rvc-dev 2020-06-24 04:00:09 +00:00