Merge "Fix split caused apps ANR" into sc-v2-dev am: ffc8cceadf

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15433213

Change-Id: Ic81c7001af5ca552dbc1e29ed62ca1f677bbba58
This commit is contained in:
Tony Huang
2021-08-10 05:41:18 +00:00
committed by Automerger Merge Worker

View File

@@ -9931,7 +9931,10 @@ public final class ViewRootImpl implements ViewParent,
if (!mUseMTRenderer) {
return;
}
mWindowDrawCountDown = new CountDownLatch(mWindowCallbacks.size());
// Only wait if it will report next draw.
if (mReportNextDraw) {
mWindowDrawCountDown = new CountDownLatch(mWindowCallbacks.size());
}
for (int i = mWindowCallbacks.size() - 1; i >= 0; i--) {
mWindowCallbacks.get(i).onRequestDraw(mReportNextDraw);
}