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
Instead of having WM Core to "guess" when to request transtiion, let the
organizer to tell whether or not it needs to be applied immediately.
With the shouldApplyIndependently parameter, we can make sure the future
runtime API to change split layout won't affect other ongoing
transition.
Bug: 207070762
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I658b0ba1ae9decc741f09cb53bfff2c45ea076a0
This way, the player doesn't have to take a second
screenshot for use during animation.
This also includes luma (only for rotation) since
that requires the actual buffer and we only want to
send the snapshot surface.
Bug: 242056267
Test: atest TransitionTests
Change-Id: Ib76bb821b4aa8c01c6db1827c26b9fb498aae878
This provides a sandbox-like scaled environment on client side.
- This prevents the metrics and config from being scaled multiple
times because the entry points are only called from server side,
there won't have reentrancy for applying the scale.
- App's configuration callback method can get scaled config.
- If override scale is enabled, the legacy compat mode will be
skipped. That avoids mixing different approaches of scaling.
- Legacy compat mode is to simulate a 320dp x 480dp screen
size with density 160 (the surface scale and config scale
are different).
- Override scale is to downscale the app for better performance
(the surface scale and config scale are the same).
Bug: 238416387
Bug: 240335717
Test: atest ActivityThreadTest#testOverrideScale
Test: atest CtsWindowManagerDeviceTestCases:CompatScaleTests
Test: am compat enable DOWNSCALED $pkg
am compat enable DOWNSCALE_50 $pkg
Change-Id: I0ddf333996f229063511273f8aeb3867c9ba8bda
Added removeTask HierarchyOp so that CaptionWIndowDecorModel now uses WindowContainerTransaction to remove task rather than IActivityTaskManager#removeTask(int)
Bug: 242094334
Test: Manual testing using acloud and unit testing (atest WmTests:WindowContainerTransactionTests)
Change-Id: I9e2f1946a517bdba6a75b7049f00943d729045f0
Refactor TaskFragmentOrganizer#onTransactionReady to
SplitController#onTransactionReady to make sure that the
transaction is handled in one sync block.
Bug: 240519866
Test: pass existing for refactor
Change-Id: I9e7191e2b71ba262e1a3f8c947f9354698382972
So that we can verify the API in CTS.
Bug: 232476698
Test: CtsWindowManagerDeviceTestCases:TaskFragmentOrganizerPolicyTest
Change-Id: I0e064f8cae48cc0281a0b462b8d072baceeeca9f
As the task of the launching activity requests attaching cross-profile
thumbnail animation but in Transication#onTransitionReady didn't be
promoted into change list, so it ends up no-op since attaching thumbnail
for cross-task requires the animating target is the task.
Fix the issue by
1) Add {FLAG_CROSS_PROFILE_OWNER_THUMBNAIL,
FLAG_CROSS_PROFILE_WORK_THUMBNAIL} in TransitionInfo.Change for shell
to know which thumbnail icon should load, according to the userId of
launching activity.
2) Remove isTask and add 1)'s change flag check in
attachCrossProfileThumbnailAnimation to make the thumbnail animation
can be played and attached on the activity-level.
Fix: 239798040
Test: as issue steps
1) Use Gmail app
2) Tap the account icon
3) Select "Switch to personal profile" (or "Switch to work profile")
4) Expect the dimmed background thumbnail icon with
task opening transition are animated in parallel
Change-Id: I90eecf4e8ba104c7234a39d1b2638295820d2ac7
animation controller
Copy most of code from RecentsAnimationController to back gesture
animation controller(BackNaviAnimationController), the infrastructure
can be reused for either back-to-home/back-to-task/back-to-activity
animations if needed. Since the infrasturcture of legacy recents
animation controller should be stable already, we don't need to
worry about issues like leak leashes/flickers/fixed rotation.
BackAnimationAdaptor is a temporary class to help migrate to shell
transition, the target is to replace it by RemoteTransition.
Next step: Migrate to shell transition, decouple animation info from
BackNavigationInfo.
Test: manually play back to home animation to verify no flicker/black
background/leak surface. Also test that there can play back to home
animation even when quick swipe.
Test: atest BackNavigationTest
Test: atest BackNavigationControllerTests BackAnimationControllerTest
Bug: 237642535
Change-Id: I436a3dcf5011c56c08d131b40168f19128cc8723
When a TaskFragmentTransaction is sent to the organizer during a
transition, have the transition wait for the organizer to finish
handling the transaction.
Bug: 207070762
Test: atest WmTests:TaskFragmentOrganizerControllerTest
Change-Id: I4b7955171cd8ce386686ff2cd64b7c04a6436ddf
Before, when receive TaskFragment transaction, we apply changes in
multiple WindowContainerTransactions. Now, update to apply all changes
in one WCT for the whole TaskFragment transaction.
Bug: 240519866
Test: pass existing
Change-Id: I943d6232ff226ed6f67367fa9b7f73e1f861de64
Merged-In: I943d6232ff226ed6f67367fa9b7f73e1f861de64
Before, when receive TaskFragment transaction, we apply changes in
multiple WindowContainerTransactions. Now, update to apply all changes
in one WCT for the whole TaskFragment transaction.
Bug: 240519866
Test: pass existing
Change-Id: I943d6232ff226ed6f67367fa9b7f73e1f861de64
Before, when receive TaskFragment transaction, we apply changes in
multiple WindowContainerTransactions. Now, update to apply all changes
in one WCT for the whole TaskFragment transaction.
Will update the TestAPI in the followup cl.
Bug: 240519866
Test: pass existing
Change-Id: I2e15b187bee95193874d76bc6963d3e01eba3910
1. Rename onActivityReparentToTask to onActivityReparentedToTask
2. Annotate @NonNull and @Nullable for the Extensions methods that are
not yet annotated.
Bug: 240519866
Test: Refactor and add annotation. Pass existing tests.
Change-Id: I85c5927e6e7261cae3bce715b1955523d430e1e2