This aligns the behavior as legacy rotation animation in commit db7097e.
Note that the crop will be cleared in finishTransaction set from core's
Transition#buildFinishTransaction.
Also clean some fields a bit.
Bug: 242664636
Test: Enable launcher rotation. Set animation scale to 10x.
Rotate display and observe that the wallpaper does not exceed
the area of previous display size.
Change-Id: Ie2144f7c19663b573167de819dde01cc9eca7ad4
Previously, if the user moved pip, and then started moving it again
before the dismiss target hide animation finished, the dismiss target
would not show up again, since it was still VISIBLE.
Test: manually, open pip and move it around, dismiss target always shows up
Bug: 242616699
Change-Id: Iac288f5855f0d26075113e795dd2b88b6a152275
IWindowSession#relayoutAsync is similar to IWindowSession#relayout, but
the former is an oneway method which just sends the layout attributes to
the server. Since the client can compute its own window frame, it just
needs to send attributes to the server without getting blocked for
receving the window frame.
In somes cases, the client still needs to obtain things from the server.
Such as:
- When view visibility is changed. The client maybe not be able to
receive the latest insets state while it is INVISIBLE or GONE. In this
case, the client needs to obtain the frame and the insets state. Also,
the client need to obtain the surface control when it becomes VISIBLE.
- When the insets state is stale but the config is up-to-date. This can
happen when WindowProcessController sends the new config to the client
before WindowState does. In this case, the client needs to obtain the
window frame from the server.
- When the position and the size of the frame are both changed. This
will trigger a BLAST sync, and the client needs to obtain the sync seq
ID.
For cases above, the client needs to call the original relayout method.
Bug: 161810301
Bug: 175861051
Test: Seamless rotation, fixed rotation, and regular rotation.
Merged-In: Ifb365789fa08103773fd3180e486ba1d92042fc5
Change-Id: Ifb365789fa08103773fd3180e486ba1d92042fc5
The work around we use seems to cause the flicker at the end of
entering content PiP animation and the underlying issue for that work
around is not found with the latest build.
Video: http://recall/-/aaaaaabFQoRHlzixHdtY/hrZU8ebsxP3mEqdaF6BfwL
Bug: 242601499
Test: repeatedly enter content PiP, see video
Change-Id: I6d9d78e6cca519ed8251221a7ceab829cb22aae1
Bug: 230077443
Test: - enable feature on phone
- drag a notification from the shade
=> observe that the drop zones match current orientation
- repeat in opposite orientation
- repeat on tablet
Change-Id: I90fbb09d36bda7b66563dc4b4ac8fe1ec9d0cb31
Added minimize button in the new WM shell to current caption and set its visibility to gone since Andoid UX is still debating on whether they will have it on by default in captions.
Bug: 242094334
Test: Used acloud to visualize and manually test changes
Change-Id: Iabeb0e94ae4adb2009dcfe7a365f9c8c9a7aa38f
ShellTransitionTests uses the real primary display and
DisplayController, and the upside down rotation is 90 degrees on some
landscape devices. This CL changes it to a mock so we have better
control on its behavior.
Bug: 242207533
Test: atest ShellTransitionTests
Change-Id: I4cacb79f5a9549f2ad62f42a92b4e01398879b5a
This will be used to transfer window decorations over transitions,
regardless of the actual handler of these transitions.
Bug: 241975249
Test: atest ShellTransitionTests
Change-Id: I86486ec5af5057c8b22ccd7e4929627667672049
Apart from making the display change has the highest priority to
decide whether to seamless rotation. Also Merge isRotationSeamless
and getRotationAnimation to one method so the animation hint can
be resolved in a single loop.
Fixes: 242179536
Test: ShellTransitionTests#testShouldRotateSeamlessly
Change-Id: I8ccf22e230fd4b6fab1e7aceb130fd876e9dc16c
- Deprecated also the custom animation handler in PhysicsAnimator
- Ensures the transactions within PiP have VsyncId being set
- Still using getSfInstance in PipResizeGestureHandler since migrating
to getInstance causes regression for resize-and-tap PiP window.
Trace: https://ui.perfetto.dev/#!/?s=8a3a073ce2f9ad84c7e377e6ba866657076adf0525444c0261e65b2e66f24a
Bug: 222697646
Test: Record perfetto trace while moving PiP, see the Trace
Test: verify PiP functionalities still work
Change-Id: I93f8bf2392425d72829600d0bbed0b3c58ec08d0
The layers should cover the window behind during rotation animation.
So it can be opaque initially to avoid blended composition for one
intermediate frame.
After the animation starts and changes the alpha < 1 to the rotation
layer for fading animation, it can still switch from opaque composition
to blended composition automatically.
Bug: 240568519
Test: atest ChangeAppRotationTest
Change-Id: Ic4173d33c15c35e252315f9cf53127c759e56ece
Remove the validation checking first before we fix the PiP-to-Split
case. The validation checking is to prevent entering the unexpected
state in split when launched by adb with activity_adjacent flag.
2369dfab4f, e9c7b90a38, already fixed it from wm-core.
We can do the validation checking from split after.
Bug: 240652871
Test: 1. Launch app from recent app.
2. Drag app to split from task bar.
Change-Id: Ia61f91dd2d505cc8b0d4f8194798b16222253ce4
The flag is used to control divider bar animation. We should also
clean the flag while exit split-screen to prevent split can not
update the divider bar visibility. Currently, the flag is clean
from remote animation finished or canceled. It’might be have the
possibility of not cleaning the flag if launch aborted.
Bug: 241861895
Test: manual
Test: pass existing tests
Change-Id: I07d1888957496dab8d5886eb7d9b21cc133b4214
- The mocking of the resources includes resource values that
aren't currently tested, but should be mocked to be consistent
with the other values. We should treat these as warnings and
not a test blocker (might be a difference in the version of
mockito used in studio dev)
Bug: 239892577
Test: Run WMShellUnitTests from sysui studio
Change-Id: I03594b6fb0889f29124882a1f61d7b94b4f90b55
We used to do only PipTaskOrganizer#scheduleResizePip without commiting
PipTaskOrganizer#scheduleFinishResizePip upon display change.
Bug: 241961056
Test: Enter PiP in unfolded state then fold the device
Test: atest WMShellUnitTests:PipControllerTest
Change-Id: I1c72c5e6016cd19017b43a8df583e730f15619a1
If a second swipe starts before a back to home animation finishes, it's
possible for subsequent MOVE events to start another back animation.
The fix is to only start back animation when the swipe's DOWN event is not
rejected.
Bug: 240109403
Fixes: 240109403
Test: Follow repro steps in 240109403#10 and make sure a second
animation cannot be started.
Test: BackAnimationControllerTest
Change-Id: Id2a5fb00f632fb9be175ef10cad7fea511d09ae0
Test: manually, open YT app, play video go to pip and expand with double tap, close pip
then go to Maps app, start nagivating, enter pip and epand with double tap - no stretching
Bug: 241400465
Change-Id: Ie061be5ed15611b3b6917d084a13f5ee1eba7e3c
* changes:
If the update is non-interruptive don't re-bubble it
Don't bubble things when we shouldn't
Ignore updates to bubbles that aren't from the system
Unusual use cases result in the split being empty.The case happens if
the intent is the same app but not support multi-instance, we should
exit split and expand that app as full screen.
Moreover, apply the same evicts logic from startShortCut to startTask
on this CL.
Bug: 235193477
Test: Launch Google calendar and drag the app to split screen
Change-Id: I1081aaa8303a551f140668c953cd2fd7c4dd3c54
The splitting tasks will be reparented to RecentAnimationSplitTasks
overlay layer in order to animate them together. However, the other
animating apps should also be placed to the same overlay layer so all of
them can be layered properly during the transition.
Fix: 239630217
Test: action menu shows above split pairs in overview panel
Change-Id: Idf4038fe575e37cdf9db16ba672208df45160ec1