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

Commit 0b5dbb02 authored by Ming-Shin Lu's avatar Ming-Shin Lu Committed by Automerger Merge Worker
Browse files

Merge "Fix NPE on WindowContainer#isOnTop" into rvc-dev am: e0ac8960 am:...

Merge "Fix NPE on WindowContainer#isOnTop" into rvc-dev am: e0ac8960 am: 86366e59 am: b5544f92 am: 558f2ba0

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882882

Change-Id: Ifee8e82e87634b5461a6d48ce5b8deb05ff87770
parents 6ae47a21 558f2ba0
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1032,7 +1032,8 @@ class WindowContainer<E extends WindowContainer> extends ConfigurationContainer<
     * @return Whether this child is on top of the window hierarchy.
     */
    boolean isOnTop() {
        return getParent().getTopChild() == this && getParent().isOnTop();
        final WindowContainer parent = getParent();
        return parent != null && parent.getTopChild() == this && parent.isOnTop();
    }

    /** Returns the top child container. */