Merge "Prevent addtional removeSurface calls" into sc-dev

This commit is contained in:
Wilson Wu
2021-04-22 07:41:49 +00:00
committed by Android (Google) Code Review

View File

@@ -184,7 +184,9 @@ public class InsetsSourceConsumer {
if (oldLeash == null || newLeash == null || !oldLeash.isSameSurface(newLeash)) {
applyHiddenToControl();
}
if (!requestedVisible && !mIsAnimationPending) {
// Remove the surface that owned by last control when it lost.
if (!requestedVisible && !mIsAnimationPending && lastControl == null) {
removeSurface();
}
}