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

Commit a3419cc2 authored by Tadashi G. Takaoka's avatar Tadashi G. Takaoka
Browse files

Fix possible NPE on delayed Runnable

This is a follow up of I776cabaeaf41.

Bug: 111361570
Test: Pass all presubmit tests in WmTests
  $ atest --test-mapping frameworks/base/services/core/java/com/android/server/wm

Change-Id: Ia8827ae205b6795ddca49ffa152e8de17d0eb8a3
parent 043a5ab3
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -66,8 +66,11 @@ public class TaskTapPointerEventListener implements PointerEventListener {
                    // method target window will lose the focus.
                    return;
                }
                mDisplayContent.getParent().positionChildAt(WindowContainer.POSITION_TOP,
                        mDisplayContent, true /* includingParents */);
                WindowContainer parent = mDisplayContent.getParent();
                if (parent != null) {
                    parent.positionChildAt(WindowContainer.POSITION_TOP, mDisplayContent,
                            true /* includingParents */);
                }
            }
        };
    }