We use to rely on the onActivityPinned and onActivityUnpinned callbacks
from Window Manager in EdgeBackGestureHandler to determine the current
PiP state and it will always be reset to false when
EdgeBackGestureHandler is being re-created, for instance, as a result of
folded state change.
Deprecated also the Pip#setPinnedStackAnimationListener interface method
since it's not in use and it may cause confusions over
IPip#setPinnedStackAnimationListener.
Bug: 174702196
Bug: 198651351
Test: stash in unfolded state -> fold -> drag to unstash \
stash in folded state -> unfold -> drag to unstash
Test: atest WMShellUnitTests:PipControllerTest
Change-Id: Id874056415011ee8a55dadcd4ec6af6e1b568092
The default behavior (if nothing is done) for a merge request
is to let the animation continue and queue up the incoming animation
to start once the current one has finished.
This is maybe the "smoothest" default; however, it is not
responsive for the user. So, instead, go through and, where
appropriate, make animations "jump-to-end" when they receive
a merge request. This way the user will see the new animation
start immediately after they perform an action. There is
technically a "jump" in the animation, but it seems like the
responsiveness is preferable and the jumps aren't super
noticable anyways. This is also how legacy transitions works
so it's not a behavior change.
Bug: 236309064
Test: interrupt animations with other transitions and observe.
Example: launch an app and then go "back" before it finishes
animating.
Change-Id: I4a76e7efe2c610b22f3fe97b0bd3ab692a01be08
The attached frame is the frame of the parent window that its child
attaches to, as long as the child is not
TYPE_APPLICATION_ATTACHED_DIALOG. It is a factor while computing the
window frame.
Previously, we let the child obtain the attached frame from its parent
view root. However, if the parent and the child are not in the same
process, it can be tricky.
This CL sends the attached frame from the server to the client via
ClientWindowFrames. In this way, the child can compute its window frame
without having to accessing the parent view root.
Bug: 161810301
Bug: 175861127
Test: atest ActivityRecordTests WindowLayoutTests
Change-Id: Ia844a4c927027e305a56114216eaee2bf7933b1f
to BackAnimation.
The original MotionEvent instance may have been recycled by the time BackAnimation processes it, since BackAnimation runs in a different thread. This could cause crashes from both Java side and native side, as described in b/233163975#comment11.
We work around this by passing the numerical values that BackAnimation
need instead of the MotionEvent itself.
Test: Swipe back in various scenarios. Make sure back can be triggered.
Try cancel. Make sure back can be cancelled.
Test: atest BackAnimationControllerTest
Bug: 233163975
Change-Id: I4792debc705536b49d1caafcc43e5466941c1d43
The RRS(runtime resolution switching) feature which supports users to
change resolution directly. Split-screen did not update the Context
object during the runtime resolution switching. That results in the
split layout can not get the proper resource in time.
This CL updates the new Context object whose resources are adjusted to
match the new given Configuration when the split bound is different
from existing. That’make sure to get the updated resources objects
when calculating the divider snap target for this case.
Bug: 235044746
Test: atest MultiWindowTests
Change-Id: I94d1a95c6b4aeb3bf1b75aed2e0b3008f036c968
This fix was introduced in ag/16150706 and recently got overridden with
ag/18751998, UnfoldAnimationController#resetTask happens in between
RecentsAnimationController cleanup and PipTaskOrganizer#onTaskAppeared
may cause flicker at the end of auto-enter-pip transition.
Fix it by intentionally ignore resetSurface if the task's pinned.
Bug: 235737615
Test: auto enter pip repeatedly on foldable
Test: atest WMShellUnitTests:UnfoldAnimationControllerTest
Change-Id: I5de034f5c0d3f150dd77aadb97c0d2b3f9c64c15
ag/18759417 introduced a new call to onTaskMovedToFront which impacted
some bubbles behavior, basically while switching bubbles the
"background" app now appears to move to the front for a moment which
causes bubbles to be collapsed. The fix is to flip the flag for
bubbles switching a bit sooner than we already do.
Test: manual - have some bubbles, visit each of them once (i.e. have
the activity launched), then visit them all again
=> verify all the bubbles can be visited both times and
the stack doesn't collapse.
Bug: 235781358
Change-Id: Id0674cafd92d5aeb802a0da77a679996e7041b74
Set vsync id to transactions moving divider bar surface, so those
transactions won't be committed together and result to empty frame while
dragging the divider bar.
Bug: 230050092
Test: manual dump and verified with perfetto trace
Change-Id: Id570e80a908a07113b8e4bd77f38c05e3eee1d0c
This fixes an issue in gesture nav, when the swipe would not be properly recognized.
Test: atest WMShellFlickerTests:EnterPipOnUserLeaveHintTest
Bug: 234848637
Change-Id: I011cd3a83531f48939d4ac4d7686e0f142b2766b
The bug was introduced in 939b27cb50 which
effectively removed the bounds resolution for fullscreen tasks.
Therefore we need to remove the bounds manually.
Also hide caption on shell behind the flag. Note we still let WM shell
handle freeform resizing so that we don't have to reintroduce an
exception for freeform windows to WM core.
Bug: 165794636
Test: Maximize buttons in legacy captions work.
Test: Caption in WM shell isn't shown when the feature is disabled and
shown when it's enabled.
Change-Id: I51d15556dabdc6713f31d7515c574dfb0db49b7a
Adds real unfold animation for split-screen tasks when
doing the Shell unfold transition.
The approach is similar to full-screen tasks:
we animate the surfaces using shell transition
only when unfolding, when folding we are doing
it in the old way (by directly accessing
the surfaces from TaskOrganizer).
Refactored the previous fullscreen/splitscreen unfold
controllers flow to have one controller where we can
register diferrent 'animators'. This controller listens
to all task events in the shell task organizer.
Bug: 204925795
Test: folding/unfolding, rotating with a split layout
when Shell transitions enabled/disabled,
rotating display when folded/unfolded
Change-Id: Iff608bc8ab2390a57b01de8f07bad681c979be49
On drag notification to split case, the pending intent calling Uid
should be app's Uid and lead to this start failed due to not system
and app didn't visible.
Put allow background activity flag on split side to ensure it could
start successful and active split screen.
Fix: 234406935
Test: manual
Test: pass existing tests
Change-Id: Ib52023f6d79d166b2b01948f2481350280a094f3
Instead of an InputMonitor for the entire display, we use window
decoration surface to monitor window resizing gestures. This allows us
to consolidate hit test to InputFlinger.
There is an issue that gesture monitor for gesture nav steals touches
from the resize window while resizing if user moves pointers too fast.
Bug: 165794880
Test: Drag resize works.
Change-Id: I2685e074dd02af55928d20a93f7c0690cc498fc5
There are still several things missing in this CL:
1. Still need to wire up freeform resizing. This is done in a separate
CL.
2. Check if a11y works as intended.
3. Wire up fullscreen and window decorations for freeform displays.
4. Immersive mode work.
Bug: 165794880
Bug: 165794636
Test: Caption shows up.
Change-Id: I7c0e1d55d6c9d03332a58d31ade88aef06a84048