Merge "Apply syncPipSurfaceState synchronously" into udc-dev am: cc112e1010

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/23700924

Change-Id: I7b94b2401f7edc6c52163d8de723e9c36749a683
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Hongwei Wang
2023-06-20 23:51:30 +00:00
committed by Automerger Merge Worker

View File

@@ -609,19 +609,15 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler,
} }
}; };
mixed.mInFlightSubAnimations++; mixed.mInFlightSubAnimations++;
// Sync pip state.
if (mPipHandler != null) {
mPipHandler.syncPipSurfaceState(info, startTransaction, finishTransaction);
}
if (!mKeyguardHandler.startAnimation( if (!mKeyguardHandler.startAnimation(
mixed.mTransition, info, startTransaction, finishTransaction, finishCB)) { mixed.mTransition, info, startTransaction, finishTransaction, finishCB)) {
mixed.mInFlightSubAnimations--; mixed.mInFlightSubAnimations--;
return false; 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; return true;
} }
@@ -637,19 +633,12 @@ public class DefaultMixedHandler implements Transitions.TransitionHandler,
finishCallback.onTransitionFinished(wct, wctCB); finishCallback.onTransitionFinished(wct, wctCB);
}; };
mixed.mInFlightSubAnimations = 1; mixed.mInFlightSubAnimations = 1;
if (!mUnfoldHandler.startAnimation(
mixed.mTransition, info, startTransaction, finishTransaction, finishCB)) {
return false;
}
// Sync pip state. // Sync pip state.
if (mPipHandler != null) { if (mPipHandler != null) {
// We don't know when to apply `startTransaction` so use a separate transaction here. mPipHandler.syncPipSurfaceState(info, startTransaction, finishTransaction);
// 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; 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 /** Use to when split use intent to enter, check if this enter transition should be mixed or