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
This commit is contained in:
committed by
Alex Vakulenko
parent
362b4131bc
commit
1e9b4b07c9
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user