OSDN Git Service

Ensure that a PIP activity gets stopped before MW/PIP mode changes.
authorWinson Chung <winsonc@google.com>
Fri, 7 Apr 2017 01:44:25 +0000 (18:44 -0700)
committerWinson Chung <winsonc@google.com>
Fri, 7 Apr 2017 21:03:57 +0000 (14:03 -0700)
commit47900650862232c0a9a01045041daaadd60765ac
treed5cb0edf9e13cddef25f7de8855c66ba5f5e5833
parentcd501ecd91bd7016639e8e62d4a739a01971f95c
Ensure that a PIP activity gets stopped before MW/PIP mode changes.

- Adds a workaround to ensure that onStop() is dispatched to the PIP
  activities when the PIP is dismissed
- Consolidating dismiss PIP behavior to call moveTaskToFullscreen().
  Now we are consistent, and when we expand the PIP, we call
  moveTaskToFullscreen(top), and when dismissing the PIP we call
  moveTaskToFullscreen(bottom)
- Fixing issue where we were dispatching extra MW/PIP mode changes when
  just expanding the PIP
- Fixing typo in last commit where PIP mode change was not getting
  scheduled correctly
- Fixing issue where move-to-fullscreen log was sent for each task

Bug: 36567036
Test: android.server.cts.ActivityManagerPinnedStackTests
Test: #testStopBeforeMultiWindowCallbacksOnDismiss

Change-Id: I303b88d75e9f136da0c238ef5987804e0684c78e
Signed-off-by: Winson Chung <winsonc@google.com>
services/core/java/com/android/server/am/ActivityStack.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java
services/core/java/com/android/server/wm/BoundsAnimationController.java