The SurfaceView of the AVD icon should be create on splash screen
thread instead of worker thread, this can guarantee that the first
frame of the FrameLayout and AVD will be draw at the same frame.
And it also become faster by combining two view in same traversal
together.
Also stop the AVD animation after splash screen window removed.
Bug: 195736516
Test: verify no more Choreographer#doFrame on splash screen thread
after splash screen window removed.
Change-Id: I5942db8974f1272d9c26ac19b164312e4424be66
If the root task of the stage is not created, treat the stage as not
focused to prevent trowing NPE when traversing the root task and its
child.
Fix: 199060332
Test: manual check isFocused won't throw before root task is ready
Change-Id: I3869f934b641c8ffd77730452d0501d65063785c
The FrameLayout and SplashScreenView are only used as container in
StartingSurfaceDrawer, so they do not need to be inflated by app's
context, which could be affected by app's resources.
Bug: 197936273
Test: cold launch test app and show splash screen.
Test: launch several apps to verify that everything is fine.
Test: atest StartingSurfaceDrawerTests
Change-Id: I6de444546b5dfba23fc1d7c9c4deb12787d667c5
- If the taskbar is collapsed and isn't providing full insets to the
app, we still want the IME to be inset for the nav button that shows
Fixes: 197727397
Test: Collapse taskbar, open IME
Change-Id: I9f2367344385c9a23e2d6323637a0b2d1713b169
This is in preparation for attaching some extra meta information
to remote transitions (eg. process token). Most of this refactor
just replaces references to the raw interface with references
to the wrapper class.
There is also a small refactor in RemoteTransitionHandler to
better-manage death-recipients. It is possible to have >1 filter
and >1 pendings referencing the same remote simultaneously, so
this arrangement properly handles the 1-to-many possibility.
Bug: 183993977
Test: refactor, so existing tests pass
Change-Id: Icae8f2128e0ffdf7aee51284cba106963450e3e7
Merged-In: Icae8f2128e0ffdf7aee51284cba106963450e3e7
We should reset these cached values when divider position reset
which should be called while split exiting.
Fix: 198557357
Test: pass exist tests
Test: manual
Change-Id: I1606ff785985752c2fd45df84a99979aa5063c64
There's a timing when dragging to split opening a new app, the new app
might not be put into DC.mOpeningApps yet while startLegacyTransition
triggering app transition. And result to executing an extra TRANSIT_NONE
app transition. This patch leaves the app transition triggering to
ActivityTaskSupervisor.reportResumedActivityLocked where the new opening
app has been put into DC.mOpeningApps.
With CL[1], it'll invoke onAnimationCancelled when there's no valid app
to anmate while executing app transition. So we don't need to cancel
animation with startActivity result.
Also unbind exit split screen logic with onAnimationCancelled in
wm-shell since it only enters split screen after a new task being
launched/reparented to the side stage root after CL[2].
[1]: I50ddc91f7bd7ed24a977fa3face9c6e56e1bea02
[2]: I1cad96f6265eb1a14369bfc708871f701764066a
Fix: 197917994
Test: drag and drop to split works
Change-Id: If9ab7c3a89c8153c3731103571162fe21c94b3aa
Try to eliminante the offscreen layer from TaskSnapshot. When remove
the task snapshot window, although the SurfaceControl has destroyed in
WindowManager, but that layer seems still left as offscreen layer in
SurfaceFlinger, a possible reason is there didn't release the copied
layer so that reference keep it alive.
Test: keep hot launch apps and monitor no TaskSnapshot layer left in
offscreen layer.
Bug: 192298258
Change-Id: I6beff78112da2309d4825e185bd960974892f5e8
- This ensures that the caller can synchronously initialize the existing
displays without waiting for the onDisplayAdded() callback, which can
happen asynchronously (since the callback is oneway).
Bug: 196186963
Test: atest WMShellUnitTests
Test: atest ActivityTaskManagerServiceTests
Change-Id: I0a8d5f9b4ede7b487a8de14bdb6eaacae7d03d9f
Flicker on master diverged form sc-v2, to make it easier to debug
flicker issues on sc-v2, push the current version of flicker into sc-v2
Test: atest FlickerTests WMShellFlickerTests
Bug: 188792659
Change-Id: I1c832bf32214b12ba4b708bccfc95cf259324844
Draw rounded corners beside divider bar which inset with task bar if
the task bar is expanded.
Bug: 196272915
Bug: 182511830
Test: atest WMShellUnitTests
Test: manul check the rounded corners rendered in proper position.
Change-Id: I14c5a9416d52bf06b3e4c8ac843c5a65c0b940b8
- Reparent above the top window as an activity can have multiple windows
- Fix ordering when reparenting tasks into the temporary split container
to match the previous ordering since the input consumer is layered
above the top window
Fixes: 197571005
Fixes: 195958376
Test: Launch maps > share place > enter overview
Enable stage split > split > enter overview
Change-Id: I84899e71f079f001eef737217897642460f5832b
Ignore PipLegacySplitScreenTest if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.
Bug: 189245318
Test: atest PipLegacySplitScreenTest
Change-Id: I6243f0b0990265c96867cb7ee87b6bd0b90330c7
When user drag the divider and drop it, we will always set split
window bounds for by transaction. But when bounds didn't changed,
we should avoid it for better performance if user operate roughly.
Bug: 195262673
Test: manual
Change-Id: I872b719395d891cb415159f8751432d5a119ce80
This issue is caused when divider position is near bottom,
The bounds hight is less than 0 due to our algorithm, if
we do setWindowCrop by this bounds, the surface bounds
status abnormal which show in winscope is full screen.
This situation make dim layer show full screen.
Whether this is Surface bug or not, it can protect it split
side. Fix it by make sure both split bounds width or height
are always larger than 0.
Fix: 197588020
Test: Active stage split, drag divider to bottom then check
Change-Id: I4bcd9ba353432bf852ad4a60b6ca9234c2cd84f1
Before this change, split bounds always reset to half-half if
rotation. This is weird on large screen devices because they can
scale bounds in landscape too, so bounds will reset even if from
landscape to seascape.
Add restore mechanism by compute ration of current divider
and total length. Use this ratio to compute estimate position in
new configuration then get suitable snap target. Update divider
position and split bounds by this snap target postition.
Fix: 192533269
Test: pass existing tests
Test: Set density to large screen, active stage split and make top
task larger then rotate to landscape.
Change-Id: I3ea12273348575ae968c76bdf9236155380526ec
In stage split, it always set the divider layer to top and it would
Cover some layer it should not cover such as pip or bubbles.
In legacy split, this ordering is handled by TDA but it cannot apply
on stage split because it directly use WindowlessWindowManager without
shell root.
Fix it by simplify the layer ordering. Make divider layer as a fixed
value. Normal task layer should always lower than it and always on top
tasks layer count start from it so we can ensure always on top tasks
higher than the divider.
Also move some constants layer value to WindowManagerPolicyConstants
for managerment and accessed by both wm-core and wm-shell.
Fix: 194359996
Test: open a pip app and active stage split then drap the pip to
divider.
Test: Pass existing tests.
Change-Id: I6e4002435be350872aec5fa154849ed6e9561ce0
Ignore legacy split flicker tests if the system is not using legacy
split by checking config_useLegacySplit which is set to false since
sc-v2 or on jumbojack device. The flag should be deprecated along with
legacy split screen.
Bug: 189245318
Test: pass existing tests
Change-Id: Ic3dfbe849e7fcc9f25e44b7ff37ad00fdee60e9a