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

Commit 842310e0 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou Committed by Android (Google) Code Review
Browse files

Merge "Add null check for DisplayInfo of DEFAULT_DISPLAY" into main

parents 13c2d5fd d51af690
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -234,6 +234,9 @@ final class AmbientKeyboardBacklightController implements DisplayManager.Display
        DisplayManagerInternal displayManagerInternal = LocalServices.getService(
                DisplayManagerInternal.class);
        DisplayInfo displayInfo = displayManagerInternal.getDisplayInfo(Display.DEFAULT_DISPLAY);
        if (displayInfo == null) {
            return;
        }
        synchronized (sAmbientControllerLock) {
            if (Objects.equals(mCurrentDefaultDisplayUniqueId, displayInfo.uniqueId)) {
                return;