History log of /frameworks/base/services/core/java/com/android/server/wm/StackWindowListener.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
3a68287c6cbb5327f824515fa128117300806fac 10-Apr-2017 Winson Chung <winsonc@google.com> Tightening up rotation behavior for PIP (1/3)

- Defer getting the default bounds until after the task has been reparented
to the pinned stack
- Also move pinned stack-related methods into pinned stack window
controller and listener

Bug: 36879891
Test: android.server.cts.ActivityManagerPinnedStackTests

Change-Id: Ib2bd81ad9e2a3829b556177010f39c7512ba35bf
/frameworks/base/services/core/java/com/android/server/wm/StackWindowListener.java
5af42fc3052ecaf35c937278a986143a65f6ce5f 25-Mar-2017 Winson Chung <winsonc@google.com> Ensuring multi-window callbacks contain new configuration and are in order

- This CL has two main changes:
1) It modifies the activity multi-window and picture-in-picture mode
changed callbacks to provide the configuration of the activity with
the mode applied.
2) It modifies the order in which the multi-window and picture-in-picture
mode callbacks are made, to ensure that when going in and out of
picture-in-picture: first PiP, then MW, and then the config change.
- Previously, the ordering of the two callbacks was inconsistent. When
calling moveActivityToPinnedStack(), we reparent the task into the pinned
stack (triggering the picture-in-picture mode change), followed by the
resize animation (causes configuration changes). Inversely, when we
expand the task to fullscreen (and not just remove it), we run the
animation first, which resizes the task to the final size (causes
configuration changes) then reparent after the animation completes
(triggering the picture-in-picture mode change).

In this CL, we ensure that for both the transition in and out of PiP, we
defer to the bounds animation to trigger the PiP mode change. Normal
calls to reparent or adding a new task are unchanged. When the PiP
mode change is called from the animation, it provides the final target
bounds which we use to calculate the target configuration of the activity
for the callback. If the bounds animation is interrupted, an update will
also be scheduled if we change the fullscreen state we are animating to.

To work around the issue where we are scheduling MW/PiP mode changes in
both the animation and the configuration change, we also now keep track
of each state internally in the ActivityRecord.

Bug: 36099777
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testConfigurationChangeOrderDuringTransition

Change-Id: I03513bc3a4d4a72c250983f22f079ce9d7a2cb40
Signed-off-by: Winson Chung <winsonc@google.com>
/frameworks/base/services/core/java/com/android/server/wm/StackWindowListener.java
1666e317dc1a17e9435246ec6c8209dbb6ee3696 16-Dec-2016 Wale Ogunwale <ogunwale@google.com> Added StackWindowContainerController

For linking ActivityStack in AMS to TaskStack window container in WMS.

Change-Id: I8b9eaef49e62854d59b22d27f80f5935a5a4d7fc
Bug: 30060889
Test: bit FrameworksServicesTests:com.android.server.wm.StackWindowContainerControllerTests
Test: bit FrameworksServicesTests:com.android.server.wm.TaskWindowContainerControllerTests
Test: Existing test pass and manual testing.
/frameworks/base/services/core/java/com/android/server/wm/StackWindowListener.java