summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2019-09-11 21:31:54 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2019-09-11 21:31:54 +0000
commit703ce15fef823e865ae8a1c14538e2887c3e17e0 (patch)
treeff3b557d825f563705913b9caf44b64452356fc1
parente6356fb848806e8c725c8dcd3bdf25e83ccd5fd2 (diff)
parent2cebfd5e5f39f7b09231562e84252f388bec3c89 (diff)
Merge "Ensure bounds animination for expanding PiP window"
-rw-r--r--core/java/android/app/Activity.java10
-rw-r--r--services/core/java/com/android/server/wm/TaskStack.java5
2 files changed, 15 insertions, 0 deletions
diff --git a/core/java/android/app/Activity.java b/core/java/android/app/Activity.java
index 287a289a7293..bf7d6324764f 100644
--- a/core/java/android/app/Activity.java
+++ b/core/java/android/app/Activity.java
@@ -946,6 +946,10 @@ public class Activity extends ContextThemeWrapper
/** @hide */
boolean mEnterAnimationComplete;
+ /** Track last dispatched multi-window and PiP mode to client, internal debug purpose **/
+ private Boolean mLastDispatchedIsInMultiWindowMode;
+ private Boolean mLastDispatchedIsInPictureInPictureMode;
+
private static native String getDlWarning();
/** Return the intent that started this activity. */
@@ -7003,6 +7007,10 @@ public class Activity extends ContextThemeWrapper
writer.print(mResumed); writer.print(" mStopped=");
writer.print(mStopped); writer.print(" mFinished=");
writer.println(mFinished);
+ writer.print(innerPrefix); writer.print("mLastDispatchedIsInMultiWindowMode=");
+ writer.print(mLastDispatchedIsInMultiWindowMode);
+ writer.print(" mLastDispatchedIsInPictureInPictureMode=");
+ writer.println(mLastDispatchedIsInPictureInPictureMode);
writer.print(innerPrefix); writer.print("mChangingConfigurations=");
writer.println(mChangingConfigurations);
writer.print(innerPrefix); writer.print("mCurrentConfig=");
@@ -8084,6 +8092,7 @@ public class Activity extends ContextThemeWrapper
if (mWindow != null) {
mWindow.onMultiWindowModeChanged();
}
+ mLastDispatchedIsInMultiWindowMode = isInMultiWindowMode;
onMultiWindowModeChanged(isInMultiWindowMode, newConfig);
}
@@ -8096,6 +8105,7 @@ public class Activity extends ContextThemeWrapper
if (mWindow != null) {
mWindow.onPictureInPictureModeChanged(isInPictureInPictureMode);
}
+ mLastDispatchedIsInPictureInPictureMode = isInPictureInPictureMode;
onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig);
}
diff --git a/services/core/java/com/android/server/wm/TaskStack.java b/services/core/java/com/android/server/wm/TaskStack.java
index bef6a37a1ebe..239bd004705f 100644
--- a/services/core/java/com/android/server/wm/TaskStack.java
+++ b/services/core/java/com/android/server/wm/TaskStack.java
@@ -1746,6 +1746,11 @@ public class TaskStack extends WindowContainer<Task> implements
if (toBounds.width() == fromBounds.width()
&& toBounds.height() == fromBounds.height()) {
intendedAnimationType = BoundsAnimationController.BOUNDS;
+ } else if (!fromFullscreen && !toBounds.equals(fromBounds)) {
+ // intendedAnimationType may have been reset at the end of RecentsAnimation,
+ // force it to BOUNDS type if we know for certain we're animating to
+ // a different bounds, especially for expand and collapse of PiP window.
+ intendedAnimationType = BoundsAnimationController.BOUNDS;
}
}