Commit Graph

14478 Commits

Author SHA1 Message Date
Sergey Volnov
2080bf02c3 Merge "Fix Content Capture Data Share" into rvc-dev am: 51ecd453b3 am: 520aa4ce18 am: e917edaa09 am: ba7b0e67fe
Change-Id: I96e28029b865671877ebd80baffa69bff99a47a0
2020-04-09 23:36:10 +00:00
Sergey Volnov
51ecd453b3 Merge "Fix Content Capture Data Share" into rvc-dev 2020-04-09 22:35:08 +00:00
Rob Carr
1417334c2d Merge "ViewRootImpl: Pass buffer to finishDrawing when requested" into rvc-dev am: 0a57530be1 am: afe03f9f46 am: f8664ea3d3 am: b58b579aa2
Change-Id: I59966bd101a15059a29e5dae84f9c5d32334b618
2020-04-09 21:48:59 +00:00
Rob Carr
0a57530be1 Merge "ViewRootImpl: Pass buffer to finishDrawing when requested" into rvc-dev 2020-04-09 20:26:43 +00:00
Sergey Volnov
6c74f7cc9a Fix Content Capture Data Share
Fixing a typo in the previous commit: s/remove/put/

Bug: 153013604
Test: ran CTS tests on sdk_gphone_x86
Change-Id: Iabe8ce51f38ac921aa5cc0e78b559e4a512b9273
2020-04-09 21:23:03 +01:00
TreeHugger Robot
9c205ff882 Merge "Add an API to set layer trace flags" into rvc-dev am: 9f990dedb3 am: 5db6b4924a am: 7cdcff516b am: 723b222e64
Change-Id: Ib8019abca731724371e1ee8ec3c344026ca15cfb
2020-04-09 16:54:03 +00:00
TreeHugger Robot
9f990dedb3 Merge "Add an API to set layer trace flags" into rvc-dev 2020-04-09 16:26:21 +00:00
Charles Chen
fa42fcc372 Merge "Fix WindowContext leak" into rvc-dev am: 5c082c998f am: c4750c036b am: 020b6173bb am: 57a0f90a57
Change-Id: I751bbbc8991c33679c22eba2e67f59a047fd997d
2020-04-09 11:50:59 +00:00
Charles Chen
5c082c998f Merge "Fix WindowContext leak" into rvc-dev 2020-04-09 07:39:29 +00:00
Vishnu Nair
9eb672e5a9 Add an API to set layer trace flags
This will be used by FlickerTests to capture composition state
in SurfaceFlinger trace.

Test: atest FlickerLibTest:LayersTraceMonitorTest
Fixes: 153563549

Change-Id: I3d09196ced43a1b0bac811e8f458c28be4e44992
2020-04-09 04:04:46 +00:00
TreeHugger Robot
21b646d15d Merge "Fix an issue that setMaxSuggestions(-1) throws unexpectedly" into rvc-dev am: 0fcab06f80 am: 41afef709e am: 7b53afcbce am: 2036a54ac0
Change-Id: Iccad994ebb42d234dbc5f72004dfb6583dfdebcf
2020-04-09 03:22:18 +00:00
TreeHugger Robot
0fcab06f80 Merge "Fix an issue that setMaxSuggestions(-1) throws unexpectedly" into rvc-dev 2020-04-09 02:23:23 +00:00
Steven Thomas
5eb08789d0 Merge "Add acquireFrameRateFlexibilityToken permission comment" into rvc-dev am: 288c434f34 am: c9af9ec01f am: 40493ddb4d am: 4d8cfec9f8
Change-Id: If52da95cea698b3bd32dcad259559a772129b0ee
2020-04-09 02:04:44 +00:00
Steven Thomas
288c434f34 Merge "Add acquireFrameRateFlexibilityToken permission comment" into rvc-dev 2020-04-09 01:08:40 +00:00
TreeHugger Robot
05d5fc6292 Merge "Populate AccessibilityEvent.getAction when preforming an action" 2020-04-09 00:30:02 +00:00
Robert Carr
6cc720b70a ViewRootImpl: Pass buffer to finishDrawing when requested
As the final enabler for the BLASTSyncEngine, we add a new relayout
result BLAST_SYNC. If the WindowState is participating in a BLAST sync
during relayout we return it to the client. If we return it to the
client the client will direct it's next draw in to a BLAST transaction
and report that transaction via finishDrawing. You can now observe
the BLASTSyncEngine working end to end in TaskOrganizerMultiWindowTests.
We do a few small clean-ups in TaskOrganizerMultiWindowTest while we
are there.

Bug: 153561718
Test: TaskOrganizerMultiWindowTests
Change-Id: I719b731350b942aafa444a33972aaef8973422ea
2020-04-08 11:18:09 -07:00
Charles Chen
4bff5be1a9 Fix WindowContext leak
The root causes of this issue are:
  1. WindowTokenClient#attachContext makes WindowTokenClient has strong
     reference to WindowContext, which leads to WindowContext cannot be
     GC'd.
  2. WMS#removeWindowToken needs MANAGE_APP_TOKEN permission which
     normal apps don't hold.

This CL does following things:
  1. Use weak reference instead on WindowTokenClient#mContext.
  2. Relax WMS#removeWindowToken to check callingUid if
     MANAGE_WINDOW_TOKEN permission is not held
  3. Deliver config changes to the client side in
     WMS#addWindowTokenWithOption
  4. Some minor fixes

fixes: 150812449
Bug: 150715095
Test: atest WindowContextTest
Test: atest WindowManagerServiceTests
Test: atest WindowTokenTests
Test: atest WindowManagerPermissionTests#testMANAGE_APP_TOKENS
Test: atest
WindowManagerPermissionTests#testADD_WINDOW_TOKEN_WITH_OPTIONS

Change-Id: I9f1d73af2abb78fc9844e6d9eb25e9f0293514e7
2020-04-08 21:30:24 +08:00
Tony Mak
976cd96983 Fix an issue that setMaxSuggestions(-1) throws unexpectedly
As per the javadoc, -1 is a valid input.

BUG: 153529167

Test: ag/10976796
Change-Id: I4cf172fbd36b893428be1bb87a9ccb0b7c5c3c6a
2020-04-08 14:16:11 +01:00
Jorim Jaggi
96980318aa Merge "Re-apply local client state when leash changes" into rvc-dev am: 9c50a64e91 am: 125072dce1 am: d0d74de729 am: 6185375b3c am: ac4d50d4ee
Change-Id: Ic2a18372df71fb7e102e30c3da07baec3b81de89
2020-04-08 11:52:34 +00:00
Steven Thomas
6faeaa2a9b Add acquireFrameRateFlexibilityToken permission comment
Add a comment explaining the permissions necessary for a successful call
to acquireFrameRateFlexibilityToken(). This is feedback from a
previously submitted CL.

Change-Id: Id316e6943153c20a06d90af844605851591e225c
Bug: 148033900
Test: n/a
2020-04-07 21:31:59 -07:00
Jorim Jaggi
ee54070608 Re-apply local client state when leash changes
When leash changes, we need to re-apply our local state, to ensure
new leash has same state as before and new leash is visible on
screen.

Test: Switch IME while open
Test: SurfaceControlTest
Fixes: 152876819
Change-Id: Ieae1aecdc3ddc427ccb89c4aa7ef7ae9283f39eb
2020-04-07 23:04:44 +00:00
Alex Spradlin
ef1c8f719f Merge "Add frame rate flexibility token" into rvc-dev am: 2845ad86a4 am: 928df10731 am: ddd44f0156
Change-Id: Ic81df70e38cc486ff883e1eb5bb6df6ecb15e677
2020-04-07 19:17:09 +00:00
Steven Thomas
2845ad86a4 Merge "Add frame rate flexibility token" into rvc-dev 2020-04-07 18:20:36 +00:00
TreeHugger Robot
2bf66482c8 Merge "Expose Display.getType() via TestApi." into rvc-dev am: bd745f763a am: 8122a3938e am: e1e4f30329 am: f845a21c07
Change-Id: Ia512ab896e77449bfbdc1a7e6fd54b4f573468a3
2020-04-07 17:40:24 +00:00
Automerger Merge Worker
37894bc45c Merge "Merge "Update controls after addToDisplay/relayout before dispatching insets" into rvc-dev am: 77d7bcc124 am: 2873becff7" into rvc-d1-dev-plus-aosp am: a5d9ff7eb6 am: 1198e2a2ec
Change-Id: I818ab389cd50935be5398904706c54e5df41739f
2020-04-07 16:55:07 +00:00
TreeHugger Robot
bd745f763a Merge "Expose Display.getType() via TestApi." into rvc-dev 2020-04-07 16:41:47 +00:00
TreeHugger Robot
77d7bcc124 Merge "Update controls after addToDisplay/relayout before dispatching insets" into rvc-dev 2020-04-07 16:26:53 +00:00
Santos Cordon
29d5b8f43e Expose Display.getType() via TestApi.
Bug: 151124371
Test: atest android.display.cts.DisplayTest
Change-Id: Id3c25fe675c1fa2b0070cf95736c608315b5e26b
2020-04-07 09:56:16 +00:00
Tiger Huang
0426a33650 Update controls after addToDisplay/relayout before dispatching insets
A window might request to control insets before it is added to WM and
expect the first dispatched WindowInsets as requested.

The first insets state returned from addToDisplay or relayout might be
not expected if the window just become thecontrol target in the
function.

With this CL, WM can return controls from addToDisplay and relayout, so
that the client can apply controls immediately, and update controlled
insets sources before dispatching the insets to the view hierarchy. This
enaures the insets dispatched are up-to-date.

Fix: 150756571
Test: atest WindowInsetsControllerTests RelayoutPerfTest
            WindowAddRemovePerfTest
Change-Id: Ib78c24beb7af5a54ad78935c3ddb260ef9645212
2020-04-07 16:05:40 +08:00
Automerger Merge Worker
0ea0caa75c Merge "Merge "Make the system action API more clear with documentation" into rvc-dev am: 3987ae1ad8 am: 66f5db1e8e" into rvc-d1-dev-plus-aosp am: 9b9021593e am: 7ff11732a8
Change-Id: I0248361a05abde1f23587d1e600db6f3ff491d49
2020-04-07 01:01:15 +00:00
Sally Yuen
3987ae1ad8 Merge "Make the system action API more clear with documentation" into rvc-dev 2020-04-06 23:54:03 +00:00
TreeHugger Robot
cec1922afc Merge "SurfaceView: Use BLAST transaction when visibility changes." into rvc-dev am: 7a851ba728 am: a50b55f770 am: 1b98e2320d am: 73758a1965
Change-Id: I7e044d42b77fd6294fe0c0484f2c73409d67fb0c
2020-04-06 21:43:09 +00:00
Rob Carr
199b626581 Merge "SurfaceView: Ensure we don't fill unused BLAST Transaction." into rvc-dev am: 0e22967d6c am: a989a1b0b8 am: 0d53701289 am: ca3f0917db
Change-Id: I882c2e8527d10665c875c9f272ccc20477b10075
2020-04-06 21:14:42 +00:00
TreeHugger Robot
7a851ba728 Merge "SurfaceView: Use BLAST transaction when visibility changes." into rvc-dev 2020-04-06 20:31:47 +00:00
Rob Carr
0e22967d6c Merge "SurfaceView: Ensure we don't fill unused BLAST Transaction." into rvc-dev 2020-04-06 20:02:13 +00:00
Jorim Jaggi
387991e2aa Merge "Revert "Revert "Defer updating InsetsSource.mFrame while animating""" into rvc-dev am: a775f45d85 am: 911ce402a4 am: 67658867a1 am: 46756d0fa2
Change-Id: Ida5cd0ca35bed637a2bc3e5cacc20168efa1d990
2020-04-06 15:48:46 +00:00
Jorim Jaggi
a775f45d85 Merge "Revert "Revert "Defer updating InsetsSource.mFrame while animating""" into rvc-dev 2020-04-06 14:27:16 +00:00
Jorim Jaggi
33a2183d4b Revert "Revert "Defer updating InsetsSource.mFrame while animating""
This reverts commit 8c56ac6b94.

Underlying issue has been fixed:

Test: InsetsControllerTest
Bug: 152071027
Change-Id: I2b80de7067bf688a6b36233b9a1e92e2cf31c148
2020-04-06 14:28:59 +02:00
Tony Huang
3b3d8ea61d Merge "Fix split divider janky" into rvc-dev am: a171ec4203 am: e6abf0b719 am: c030cdafad am: d1db0d4023
Change-Id: Ie2fedd5893590745c62d85819693f71a38c46f27
2020-04-06 08:52:20 +00:00
Tony Huang
a171ec4203 Merge "Fix split divider janky" into rvc-dev 2020-04-06 07:24:15 +00:00
Steven Thomas
6ec6fbc2cc Add frame rate flexibility token
Add support for temporarily relaxing frame rate restrictions in surface
flinger. This is used by CTS tests to get a consistent device state
while running frame rate tests.

Bug: 148033900

Test: - On a Pixel 4, I turned the brightness down and covered the
ambient light sensor, causing the display manager to set a frame rate
restriction. I ran the frame rate CTS test without these CLs applied,
and confirmed the test failed because surface flinger couldn't switch
frame rates, as expected. Then I ran the tests with the CLs applied, and
confirmed the tests pass.

- I confirmed that, without adopting shell permission identity, the CTS
test is denied the request to acquire a frame rate flexibility token. So
normal apps won't be able to access this.

Change-Id: Ie2b611cf5726c14a7a22e315a85bf6200d190682
2020-04-04 19:55:00 -07:00
Rob Carr
9d02abec80 Merge "BLASTBufferQueue: Fix unnecessary copying of Surface" into rvc-dev am: 73e4cc48c7 am: 1827f745ae am: 95cdc5fc5c am: ade8075965
Change-Id: I17cab3aeffaec66bf7264e5aaa7d94c6dfc971d4
2020-04-03 22:58:14 +00:00
Robert Carr
92e08bf997 SurfaceView: Ensure we don't fill unused BLAST Transaction.
If BLAST is enabled and we somehow end up in positionLost or
setParentSpaceRectangle without having called setUseBLASTSyncTransaction
we will end up putting operations in to a Transaction which will never be
applied. This condition should be considered a bug, but it's best to
defend against it. To compensate, rather than checking the global
use BLAST flag, we check if the current draw is actually using
BLAST.

Bug: 152663327
Bug: 152780239
Test: Existing tests pass
Change-Id: I3c05b83400b59be82a339933fc8ef1382d4f0e21
2020-04-03 15:07:35 -07:00
Rob Carr
73e4cc48c7 Merge "BLASTBufferQueue: Fix unnecessary copying of Surface" into rvc-dev 2020-04-03 21:48:08 +00:00
TreeHugger Robot
53700f16e7 Merge "Revert "Fix DecorView error about non-visual context"" into rvc-dev am: 59a65bdc0f am: fca4a6e057 am: 3dc933b9b1 am: 518d408967
Change-Id: I4f320ff2ce2df427d4c032639f97d7db1150be55
2020-04-03 20:42:04 +00:00
Rob Carr
c2dc32f00c Merge "BLASTBufferQueue: Avoid unnecessary transactions" into rvc-dev am: 0bed41a993 am: 5192d2be9b am: e8ea7c64cf am: d4fda59476
Change-Id: I20b5d3554de88cc7991d8851d58284587f54f0a7
2020-04-03 20:22:53 +00:00
TreeHugger Robot
59a65bdc0f Merge "Revert "Fix DecorView error about non-visual context"" into rvc-dev 2020-04-03 19:53:56 +00:00
Rob Carr
0bed41a993 Merge "BLASTBufferQueue: Avoid unnecessary transactions" into rvc-dev 2020-04-03 19:04:42 +00:00
Vadim Tryshev
5420fffe19 Revert "Fix DecorView error about non-visual context"
This reverts commit 828c498904.

Reason for revert: b/152806048
Bug: 152806048

Change-Id: I0ba53944a7fddf42cccf79c6495945c8afa3ab31
2020-04-03 18:06:05 +00:00
Robert Carr
59773cbdd4 SurfaceView: Use BLAST transaction when visibility changes.
If visibility changes we will try and hide the Surfaces from
the RT. We want to sync this with ViewRoot drawing so
we enable BLAST sync for the next frame in this case.

Bug: 152663327
Bug: 152780239
Test: Existing tests pass
Change-Id: I9cd157954a3ce87a8f95a7be97d6d5c7f324327b
2020-04-03 17:12:58 +00:00