summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java25
1 files changed, 7 insertions, 18 deletions
diff --git a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
index 74871d8e4e89..182c27576df7 100644
--- a/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
+++ b/libs/WindowManager/Shell/src/com/android/wm/shell/transition/DefaultMixedHandler.java
@@ -632,19 +632,15 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler,
}
};
mixed.mInFlightSubAnimations++;
+ // Sync pip state.
+ if (mPipHandler != null) {
+ mPipHandler.syncPipSurfaceState(info, startTransaction, finishTransaction);
+ }
if (!mKeyguardHandler.startAnimation(
mixed.mTransition, info, startTransaction, finishTransaction, finishCB)) {
mixed.mInFlightSubAnimations--;
return false;
}
- // Sync pip state.
- if (mPipHandler != null) {
- // We don't know when to apply `startTransaction` so use a separate transaction here.
- // This should be fine because these surface properties are independent.
- final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
- mPipHandler.syncPipSurfaceState(info, t, finishTransaction);
- t.apply();
- }
return true;
}
@@ -684,19 +680,12 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler,
finishCallback.onTransitionFinished(wct, wctCB);
};
mixed.mInFlightSubAnimations = 1;
- if (!mUnfoldHandler.startAnimation(
- mixed.mTransition, info, startTransaction, finishTransaction, finishCB)) {
- return false;
- }
// Sync pip state.
if (mPipHandler != null) {
- // We don't know when to apply `startTransaction` so use a separate transaction here.
- // This should be fine because these surface properties are independent.
- final SurfaceControl.Transaction t = new SurfaceControl.Transaction();
- mPipHandler.syncPipSurfaceState(info, t, finishTransaction);
- t.apply();
+ mPipHandler.syncPipSurfaceState(info, startTransaction, finishTransaction);
}
- return true;
+ return mUnfoldHandler.startAnimation(
+ mixed.mTransition, info, startTransaction, finishTransaction, finishCB);
}
/** Use to when split use intent to enter, check if this enter transition should be mixed or