Merge "Fix NPE on WindowContainer#isOnTop" into rvc-dev am: e0ac89603b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11882882 Change-Id: Ib186fc743b412b7bb5d737244b1274c98eec9586
This commit is contained in:
@@ -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. */
|
||||
|
||||
Reference in New Issue
Block a user