summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tony Huang <tonyychuang@google.com> 2021-08-10 05:28:43 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-08-10 05:28:43 +0000
commitffc8cceadf70e28eedb11a84e8e3616d50f7b9d7 (patch)
tree4134d2fc069a5f1ae4c41292ddcc2d6629eb7a80
parentcc2ca8b95c69982cc7e60c1ea7905e65924b6333 (diff)
parentb29b6aac05a15d49f182f108981847f20c06ca12 (diff)
Merge "Fix split caused apps ANR" into sc-v2-dev
-rw-r--r--core/java/android/view/ViewRootImpl.java5
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);
}