diff options
Diffstat (limited to 'core/java/android/view/InsetsSourceConsumer.java')
| -rw-r--r-- | core/java/android/view/InsetsSourceConsumer.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/core/java/android/view/InsetsSourceConsumer.java b/core/java/android/view/InsetsSourceConsumer.java index 8e50fed7f392..f6df9f49d93f 100644 --- a/core/java/android/view/InsetsSourceConsumer.java +++ b/core/java/android/view/InsetsSourceConsumer.java @@ -179,7 +179,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(); } } |
