Don't set mNextDrawUseBlastSync when hardware is not enabled

Otherwise, it will make the ViewRootImpl pause forever. Because there
won't be any frame-drawing callback where we clear the flag.

Fix: 182797514
Test: steps in the bug
Change-Id: Iadd35f1b112626399c064a1cd7d7da323bb9e36c
This commit is contained in:
Tiger Huang
2021-04-05 17:56:17 +08:00
parent 6c9640f8b3
commit 7c51474301

View File

@@ -3207,7 +3207,9 @@ public final class ViewRootImpl implements ViewParent,
Log.d(mTag, "Relayout called with blastSync");
}
reportNextDraw();
mNextDrawUseBlastSync = true;
if (isHardwareEnabled()) {
mNextDrawUseBlastSync = true;
}
}
boolean cancelDraw = mAttachInfo.mTreeObserver.dispatchOnPreDraw() || !isViewVisible;