Merge "Null check for logicaldisplay" into sc-dev

This commit is contained in:
Fiona Campbell
2021-07-29 08:39:31 +00:00
committed by Android (Google) Code Review

View File

@@ -3285,6 +3285,9 @@ public final class DisplayManagerService extends SystemService {
synchronized (mSyncRoot) {
final LogicalDisplay display = mLogicalDisplayMapper.getDisplayLocked(displayId);
if (display == null) {
return null;
}
final DisplayDevice device = display.getPrimaryDisplayDeviceLocked();
if (device == null) {
return null;