Merge "Abort dispatching animation callbacks if the root view is gone"

This commit is contained in:
Jorim Jaggi
2020-02-13 18:19:54 +00:00
committed by Android (Google) Code Review

View File

@@ -882,6 +882,9 @@ public class InsetsController implements WindowInsetsController, InsetsAnimation
} else {
hideDirectly(types);
}
if (mViewRoot.mView == null) {
return;
}
mViewRoot.mView.dispatchWindowInsetsAnimationPrepare(animation);
mViewRoot.mView.getViewTreeObserver().addOnPreDrawListener(new OnPreDrawListener() {
@Override