diff options
| author | 2021-08-10 05:28:43 +0000 | |
|---|---|---|
| committer | 2021-08-10 05:28:43 +0000 | |
| commit | ffc8cceadf70e28eedb11a84e8e3616d50f7b9d7 (patch) | |
| tree | 4134d2fc069a5f1ae4c41292ddcc2d6629eb7a80 | |
| parent | cc2ca8b95c69982cc7e60c1ea7905e65924b6333 (diff) | |
| parent | b29b6aac05a15d49f182f108981847f20c06ca12 (diff) | |
Merge "Fix split caused apps ANR" into sc-v2-dev
| -rw-r--r-- | core/java/android/view/ViewRootImpl.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/view/ViewRootImpl.java b/core/java/android/view/ViewRootImpl.java index 27eb2a551898..7d75d998c253 100644 --- a/core/java/android/view/ViewRootImpl.java +++ b/core/java/android/view/ViewRootImpl.java @@ -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); } |