Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment