This reverts commit 45dd2a3202.
Reason for revert: b/195280234 is blocking droidfood
Bug: b/195280234
Change-Id: I09593dffb797d1e4c60cff52e7901ed6c00f719c
This CL fixes one of the issues with SurfaceView parent frame and
content syncing.
With BLAST, we have two surface controls each setting a scale. The
parent surface control sets a scale based on the requested surface
size and the SurfaceView layout size. The BlastBufferQueue surface
control scales the buffer to the requested buffer size if the buffer
has the appropriate scale mode.
The destination frame controls the second scaling and it must be
applied with the parent surface scale changes. This cl fixes flickers
where the requested fixed surface size changes without any view size
changes. This cl allows the caller to pass in a transaction to
BLASTBufferQueue#update which is updated with the destination frame
changes. This transaction can then be applied with the parent
surface changes.
This also fixes an issue where destination Frame was being set on
every buffer update and when we updated the BlastBufferQueue size.
Since buffer transactions can be queued up on the server side, a
stale value maybe applied for a few frames causing flickers.
Fixes: 194458377
Test: bug repro steps
Test: atest SurfaceViewSyncTest#testSurfaceViewSetFixedSize
Change-Id: I118bd1c3942b389e3951c3fd7389403895fc7b31
This result will be used by Launcher when deciding if we should start
the auto-enter-pip transition.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/c9raN4jiaNqbiV7DF4YTJ6
Bug: 194272108
Test: try auto-enter-pip with permission disabled
Change-Id: Iea3a45fd68b54d74e7d5da91b63684c206a0132e
This CL aims to clarify on what the return value of
InputConnection#setImeConsumesInput()
means for both the IME authors and editor authors [1][2].
In short, the semantics is exactly the same as
InputConnection#performSpellCheck()
hence this CL reuses its @return section.
Other than clarifying an API doc, this CL changes nothing.
[1]: Ic04cacfd73f1f4cb254bb16caf6b04c00c91a318
30fe6aa964
[2]: I8ac1ea4d53f747b0086ed415ff90793dfc6155bc
66b21086e3
Bug: 175362887
Fix: 194099171
Test: presubmit
Change-Id: Ibdfe81a9dd1448856797aaed2f14de1314da1cac
Merged-In: Ibdfe81a9dd1448856797aaed2f14de1314da1cac
(cherry picked from commit f9ca70be57)
MediaProjection is used by apps to capture the contents of
a display. Apps consume the content from a surface passed
in to MediaProjection#createVirtualDisplay. The images
written out to the surface can be used for saving
screenshots of the current display, screen recording,
or casting to a different display.
MediaProjection is currently tied to capturing a physical
display. This change instead captures the DisplayArea
the app is launched on. This is consistent with Display API
sandboxing, which returns the DisplayArea bounds rather
than the physical display bounds.
Note that apps use the Display APIs to size the
VirtualDisplay and output surface.
Verified: screenshots, screen recording, and casting
Bug: 180624777
Test: atest WmTests:DisplayContentTests
Change-Id: I909e9d32f573aec33869d9f49d6caffc8d7420aa
These are needed for keyguard transitions. The ones added are:
A NOT requirement which will reject transitions with a matching
change.
The ability to match containers that aren't independent.
Checks for global transition flags as well as individual change
flags.
Match only if container is a task.
Bug: 191799478
Test: atest ShellTransitionTests
Change-Id: I963c6c91cdfc0b71a75ba9656261bb0e237f11f1
Previously, the maximum length the client window can get for the
wrap-content side is the non-decor display width (or height) which
doesn't take the system bar visibilities into account.
This CL gives the wrap-content window more space if any of the system
bars is hidden.
This CL also refines the logic of selecting the fake control target
which is not always the focused window.
Fix: 193978485
Test: Open "Start Recording?" dialog on YouTube in fullscreen mode.
See if the dialog can fill the screen while its content is not
fully displayed.
Swipe down from top, and see if the dialog is shifted down.
Change-Id: I3f7a71729196311e8f7406c6e07f68d23febe9a6
- Add a new string array config that stores the unique id of each
display and when loading the cutout configs we first look up the index
of the unique id of the added display in the array and use this index
to load the corresponding cutout configs.
- Add new array configs for every cutout configs.
Bug: 186604541
Test: make
Test: check the device and see if the cutout is correctly set for each
display
Change-Id: I038832795c11cd16969caff5031fa1090493b008
This also adds a WAKE transition type to handle situations where
a showWhenLocked activity is made visible during wake.
Bug: 191799478
Bug: 183993924
Test: atest ActivityStarterTests
Change-Id: I18f9f5a0af41766a52efd87855f6a3b074aa98f1
InsetsState contains much more information than visibilities, such as
display frame, display cutout, rounded corners, privacy indicator
bounds, and frames of of insets sources. The control target only needs
to send the requested visibilities to WMS, so it can be too heavy to use
InsetsState.
This CL introduces an new class, InsetsVisibilities, which only contains
which type has which visibility. So it uses less memory, and it is more
efficient on copying and checking the equality.
Fix: 194186241
Test: atest InsetsVisibilitiesTest WindowAddRemovePerfTest
InsetsControllerTest RegisterStatusBarResultTest
CommandQueueTest LightsOutNotifControllerTest
ActivityRecordTests DisplayContentTests
DisplayPolicyLayoutTests InsetsPolicyTest
InsetsSourceProviderTest InsetsStateControllerTest
WindowFrameTests WindowManagerServiceTests WindowStateTests
Change-Id: I86c1b26b4383bfa3b924726d580e5706e13ba735
- Exposes a method to set that a certain part of the SF hierarchy is
trusted, and sets this state for tasks in PIP.
Bug: 191529039
Test: Manual, try using permission dialog while PIP is active
Change-Id: I170cb5a7d22ef569eb36de21cc0bcbef60dd385e
Transform hint should only be updated when creating the
surface or the view is visible. If the view is not visible, BBQ
will be null. This fixes a NPE in SurfaceView.
Test: go/wm-smoke
Fixes: 193618182
Change-Id: I98a463ae23a93d89ac803e2c2d80ecfd56ca97d2
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
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
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
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
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
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
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
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