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

Commit f0ed3eeb authored by Paul Colta's avatar Paul Colta
Browse files

HDMI: Avoid NullPointerException when deviceProductInfo is null.

Test: atest com.android.server.hdmi
Flag: EXEMPT bugfix
Bug: 425803412
Change-Id: Iaa9665b072be06fc7d0893306be167c33cc995b5
parent a6a2ba5a
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -5306,9 +5306,11 @@ public class HdmiControlService extends SystemService {
        Display display = getContext().getDisplay();
        if (display != null) {
            DeviceProductInfo deviceProductInfo = display.getDeviceProductInfo();
            if (deviceProductInfo != null) {
                manufacturerPnpId = deviceProductInfo.getManufacturerPnpId();
                manufactureYear = deviceProductInfo.getManufactureYear();
            }
        }
        int enumLogReason =
                HdmiStatsEnums.LOG_REASON_POWER_STATE_CHANGE_ON_ACTIVE_SOURCE_LOST_TOGGLE_UNKNOWN;
        if (playback() != null) {