Merge "Validate target view surface in PipDismissTargetHandler" into tm-dev am: 5cb6c5a9c9
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17821975 Change-Id: I8d4187b1c51b62435e813013dcdf5bda91149229 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -220,10 +220,16 @@ public class PipDismissTargetHandler implements ViewTreeObserver.OnPreDrawListen
|
||||
return;
|
||||
}
|
||||
|
||||
final SurfaceControl targetViewLeash =
|
||||
mTargetViewContainer.getViewRootImpl().getSurfaceControl();
|
||||
if (!targetViewLeash.isValid()) {
|
||||
// The surface of mTargetViewContainer is somehow not ready, bail early
|
||||
return;
|
||||
}
|
||||
|
||||
// Put the dismiss target behind the task
|
||||
SurfaceControl.Transaction t = new SurfaceControl.Transaction();
|
||||
t.setRelativeLayer(mTargetViewContainer.getViewRootImpl().getSurfaceControl(),
|
||||
mTaskLeash, -1);
|
||||
t.setRelativeLayer(targetViewLeash, mTaskLeash, -1);
|
||||
t.apply();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user