From 0b1e012679136ec6c59390a3697928fda28a2d02 Mon Sep 17 00:00:00 2001 From: Jordan Demeulenaere Date: Wed, 9 Mar 2022 11:19:36 +0100 Subject: [PATCH] Fix dialog exit animation This CL fixes a bug that could happen when animating a dialog out at the same time as hiding the SystemUI shade, and that would make the phone unusable until the shade is swiped down again. See b/223387276 for more info. Bug: 223387276 Test: Manual, see b/223387276#comment1 Change-Id: If251b00558a5ca9a927d1be2bb015f1c0acb2d57 --- core/java/android/view/ViewRootImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 760e021bd4abe..3a390ab75e649 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -3448,6 +3448,12 @@ public final class ViewRootImpl implements ViewParent, mReportNextDraw = false; pendingDrawFinished(); } + + // Make sure the consumer is not waiting if the view root was just made invisible. + if (mBLASTDrawConsumer != null) { + mBLASTDrawConsumer.accept(null); + mBLASTDrawConsumer = null; + } } }