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

Commit c2afe4ff authored by Mady Mellor's avatar Mady Mellor
Browse files

Fix an NPE in onTopologyChanged

I'm seeing an NPE here when the app handle is showing for bubbles
on foldable. Marking topology as potentially null and return
when it is.

Flag: EXEMPT null check
Test: manual - turn on enable_bubble_anything flag and open an app
Bug: 398867440
Change-Id: I5819295315f19a16886f2a834f94c0162094c314
parent 2ae29b62
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -363,10 +363,11 @@ class MultiDisplayVeiledResizeTaskPositioner(
        dragEventListeners.remove(dragEventListener)
    }

    override fun onTopologyChanged(topology: DisplayTopology) {
    override fun onTopologyChanged(topology: DisplayTopology?) {
        // TODO: b/383069173 - Cancel window drag when topology changes happen during drag.

        displayIds.clear()
        if (topology == null) return
        val displayBounds = topology.getAbsoluteBounds()
        displayIds.addAll(List(displayBounds.size()) { displayBounds.keyAt(it) })
    }