Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 544a8e23 authored by Fengjiang Li's avatar Fengjiang Li
Browse files

Fix NPE when inflating view on BG thread

Fix: 393282510
Flag: NONE - released code
Test: presubmit
Change-Id: If47e238d67b9384e8326abf3b7254840e3d44829
parent 10770a27
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -516,8 +516,9 @@ public abstract class LayoutInflater {
            mConstructorArgs[0] = inflaterContext;
            View result = root;

            if (root != null && root.getViewRootImpl() != null) {
                root.getViewRootImpl().notifyRendererOfExpensiveFrame();
            ViewRootImpl viewRootImpl = root != null ? root.getViewRootImpl() : null;
            if (viewRootImpl != null) {
                viewRootImpl.notifyRendererOfExpensiveFrame();
            }

            try {