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

Commit 245cf108 authored by Fiona Campbell's avatar Fiona Campbell
Browse files

Null check for logicaldisplay

Ensure that the logical display is valid before calling getPrimaryDisplayDeviceLocked() on it first.

Bug: 194542389
Test: Manual
Change-Id: I788527a3cd02fcc12efe0b8d84e26d5d66f53762
parent a16f9cc2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -3285,6 +3285,9 @@ public final class DisplayManagerService extends SystemService {

            synchronized (mSyncRoot) {
                final LogicalDisplay display = mLogicalDisplayMapper.getDisplayLocked(displayId);
                if (display == null) {
                    return null;
                }
                final DisplayDevice device = display.getPrimaryDisplayDeviceLocked();
                if (device == null) {
                    return null;