Null check for logicaldisplay
Ensure that the logical display is valid before calling getPrimaryDisplayDeviceLocked() on it first. Bug: 194542389 Test: Manual Change-Id: I788527a3cd02fcc12efe0b8d84e26d5d66f53762
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user