summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Hongwei Wang <hwwang@google.com> 2023-06-20 23:50:46 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2023-06-20 23:50:46 +0000
commitef185b36373e0b0976d5c401769426f285475f41 (patch)
tree10f7624c00f855009ce589719705098ecdf3a71c
parent7ba1890c2529f747a6efd5b9a6707c54329bacd2 (diff)
parentcc112e1010a9c0c2a191fdde1db22f37b02d645d (diff)
Merge "Apply syncPipSurfaceState synchronously" into udc-dev am: cc112e1010
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23700924 Change-Id: I47f8903abcb43f7131a370cd442a58c70654b939 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-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 3059e855b16c..e83780a6fc77 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
@@ -609,19 +609,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;
}
@@ -637,19 +633,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