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

Commit 1e9b4b07 authored by Steven Thomas's avatar Steven Thomas Committed by Alex Vakulenko
Browse files

Avoid NPE in NightDisplayService when VR mode is invoked

Bug: b/32086748

Test: I was seeing the crash without the CL. With the CL no more crash.
Change-Id: I286af1066ce8928ed72a83a8da645fe99953fd85
parent 362b4131
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -111,7 +111,7 @@ public final class NightDisplayService extends SystemService
                            getLocalService(DisplayTransformManager.class);
                    if (enabled) {
                        dtm.setColorMatrix(LEVEL_COLOR_MATRIX_NIGHT_DISPLAY, MATRIX_IDENTITY);
                    } else if (mController.isActivated()) {
                    } else if (mController != null && mController.isActivated()) {
                        dtm.setColorMatrix(LEVEL_COLOR_MATRIX_NIGHT_DISPLAY, MATRIX_NIGHT);
                    }
                }