* changes:
Describe requested visibilities in public types (3/n: server side)
Describe requested visibilities in public types (2/n: client-server)
Describe requested visibilities in public types (1/n: client side)
This CL introduces BackProgressAnimator which runs in app's main thread.
It receives target progress values from SysUI and drives the actual
progress value passed to the app with a high stiffness, no bounce
spring.
Bug: 238475284
Test: atest WindowOnBackDispatcherTest
Test: atest BackAnimationControllerTest
Test: atest TouchTrackerTest
Change-Id: I5183fc8e77ada4dfb985addd8d5193ef335a558a
This CL makes the client send an integer (instead of InsetsVisibilities)
as the requested visible types to the server.
This CL also removes the usages of InsetsVisibilities from WM shell.
Bug: 253420890
Bug: 234093736
Test: atest ActivityRecordTests DisplayContentTests InsetsPolicyTest
InsetsStateControllerTest WindowContainerInsetsSourceProviderTest
WindowLayoutTests WindowManagerServiceTests WindowStateTests
WindowAddRemovePerfTest StartingSurfaceDrawerTests
TaskSnapshotWindowTest
Change-Id: I29d245e3c36a29f01bdd3347fe858727c3540ff8
The collected WindowToken's (e.g. status bar, navigation bar)
isVisibleRequested may be changed according to its WindowState's
visibility policy or the visibility of who is controlling the insets.
They are not aware of the WindowToken surface visibility, so keep
them untouched unless shell transition supports general window
animation or even insets animation.
Bug: 251214841
Test: atest FlickerTests:CloseImeAutoOpenWindowToAppTest
Test: Launch an activity that requests to hide system bars.
And use shell command to change display size at the same time.
After the launch transition is finished, the system bars
can still be visible when swiping from bottom or top.
Change-Id: I2403e2dcbc6684774c9c3b74768a32c7b7a3b8ae
1. When moveActivityToPinnedRootTask with creating a new Task for PiP,
make sure the Task's initial bounds is the same as the activity
parent TaskFragment so the animation starts from the correct bounds.
2. When exit PiP to previous Task, make sure we are animating the
correct window surface. For the previous implementation. there can
also be TRANSIT_CHANGE change for entering ActivityEmbedding split
(from PiP) in the same transition.
Bug: 207070762
Test: atest WmTests:RootWindowContainerTests
Test: atest WmTests:TransitionTests
Change-Id: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
1. When moveActivityToPinnedRootTask with creating a new Task for PiP,
make sure the Task's initial bounds is the same as the activity
parent TaskFragment so the animation starts from the correct bounds.
2. When exit PiP to previous Task, make sure we are animating the
correct window surface. For the previous implementation. there can
also be TRANSIT_CHANGE change for entering ActivityEmbedding split
(from PiP) in the same transition.
Bug: 207070762
Test: atest WmTests:RootWindowContainerTests
Test: atest WmTests:TransitionTests
Merged-In: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
Change-Id: Ifba090ad9ac9fb7033d343eab1c87c1a67bb9c11
The root cause is that TaskFragmentParentInfo wasn't be dispatched
when there's a display or visibility change because we didn't
implement getTaskFragment() in TaskFragment and it led to
the TskFragment can't return itself if the predicate function
returns true.
This CL fixes WC#getTaskFragment and changes to dispatch
Task#shouldBeVisible instead of Task#isVisibleRequested.
The reason is that the visibleRequested change is not early enough for
the scenario that device is folded from unfolded state, and lead to
Settings flickering.
Test: manual - open Settings and fold the device
Test: atest TaskTests#testGetTaskFragment
Test: atest TaskFragmentOrganizerControllerTest ActivityRecordTests
fixes: 249055633
Change-Id: Ie1c56758697d14b426c9ed713da84e49c9f880d8
Activity could call setTranslucent during a transition playing, if the
task of an activity was in transition and that activity should become
invisible, it would be defer until transition finish.
However, since the activity wasn't participant the running transition,
there won't do commitVisibility for it after transition finish.
To correct the visibility status, trigger another transition so the
activities which visibility changed can be collect and commit.
Bug: 246518648
Test: atest testConvertTranslucentOnTranslucentActivity
Test: atest testConvertTranslucentOnNonTopTranslucentActivity
Change-Id: Ic1cda79da37162cca2a1a3fbc73311cc325b3874
When back animation finished, it will invoke the real back callback and
cause a new transition started.
In this CL, we introduce the back transition handler to consume the
incoming transition request and takeover the whole transition if the
transition info contians same departing window token.
This also seperated the behaviors of enabled/disabled shell
transition.
Bug: 238475694
Test: Enabled shell transition, atest BackNavigationControllerTests
BackAnimationControllerTest
Change-Id: I57e7c89ce6cb7a99ab3af403704b9dd948f26151
In previous design, it would create all necessary leashes when starting
back navigation, and they would be carried by `BackNavigationInfo` and
`BackEvent` and would finally deliver to the shell and animator side.
In this CL, we will use the adapter that wraps a back animation runner
to deliver all leashes in next surface placement after back navigation
has started.
In shell side, every animator should be registered by type, so the
adapter could deliver leashes via IRemoteAnimationRunner to the
target animator, and invoke callback when it finished.
This also eliminated all unecessary fields from `BackNavigationInfo` and
`BackEvent`.
Bug: 241808055
Test: atest BackNavigationControllerTests BackAnimationControllerTest
BackNavigationTest
Change-Id: I8bbec0d8d9631110c3d2788d958b50ae487520a7
If shell is starting an existing transition, it doesn't need the
returned transition token so it can be an async call then it won't
block shell's thread to execute other operations.
If shell is starting a new transition, then use the new added 2-way
startNewTransition which is the same as the original path.
Bug: 248550757
Test: atest ShellTransitionTests
Test: CtsWindowManagerDeviceTestCases with shell transition
Change-Id: I5f64d19475d5b857a461775dd6f3002567e93ad8
Before, we call Activity#finish() to finish activities when removing
TaskFragment. This may start a CLOSE transition before the organizer has
a chance to request the actual transition type.
Now, we allow the organizer to finish activities through WCT so that the
operation is atomic and the organizer can request the correct transition
type.
Bug: 240519866
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Test: atest CtsWindowManagerDeviceTestCases:TaskFragmentOrganizerTest
Change-Id: I54671fb2dd34dca952468305429a90d89953de69
Allow clients to request a display screen capture using a specified
displayId. The caller can pass in their own required arguments and they
will get the screenshot via an async callback directly from SF.
Test: ScreenshotTests
Test: WindowManagerServiceTests#testCaptureDisplay
Bug: 242714168
Change-Id: If56bdf7aae07120e94cdb11bc6620302a886e585
This CL propagates visibility from Activity to Task, and dispatch
#onTaskFragmentParentInfoChanged is there's a task visiblity
update. This CL also send the callback when the associated Display
of Task changes.
Test: atest TaskFragmentOrganizerControllerTest
fixes: 243609832
Change-Id: I3b0198cfd11a3ec4917f92d0a1e540cf16827d08
This CL adds a TaskFragmentParentInfo class and extends
onTaskFragmentParentInfoChanged to dispatch display ID and
visibility of the parent Task.
It makes SplitController able to track visibility and display
changes and used to update SplitContainers if there's a folding
state change.
Test: atest SplitControllerTest TaskFragmentOrganizerControllerTest
Bug: 243609832
Bug: 207494880
Change-Id: If3d5db621b20d4005ce0b60e46ac98e1d1e962e3
If the crop value passed in the args for captureDisplay is invalid, use
the display bounds instead.
Test: WindowManagerServiceTests#testCaptureDisplay
Bug: 242714168
Change-Id: Iebe42fd35c5f49b6e711699aa1b986a556a5a5f8
Allow clients to request a display screen capture using a specified
displayId. The caller can pass in their own required arguments and they
will get the screenshot via an async callback directly from SF.
Test: ScreenshotTests
Bug: 242714168
Change-Id: I387f58d342f01ae71b85311fbf0634f0e7901f7d
Same as the legacy app transition, we want to play the app customized
animation if there is no AE split.
We don't support app customized animation when there is AE split yet to
make the animation consistant.
Bug: 207070762
Test: atest WMShellUnitTests:ActivityEmbeddingControllerTests
Test: atest WmTests:TransitionTests
Change-Id: I68348cd650b9dbc8c39ef8d22a171d128e196882
Same as the legacy app transition, we want to play AE animation if all
changes are in Task with embedded activity
Bug: 207070762
Test: atest WmTests:TransitionTests
Change-Id: I66c5c083a517b3254d647c7335264eba8837f0cd
The callback handling is moved to SplitController#onTransactionReady, no
longer need those TestApi.
This is different from the merged-in cl for CTS compatibility in the
current release.
Bug: 240519866
Test: pass existing
Change-Id: I66ddd51c94003254001436ff0505dde3b26d0437
Merged-In: I66ddd51c94003254001436ff0505dde3b26d0437
The callback handling is moved to SplitController#onTransactionReady, no
longer need those TestApi.
Bug: 240519866
Test: pass existing
Change-Id: I66ddd51c94003254001436ff0505dde3b26d0437