diff options
| author | 2024-10-03 12:50:47 +0000 | |
|---|---|---|
| committer | 2024-10-03 12:50:47 +0000 | |
| commit | af23c6cd77a7de849618ca22caa2d718b00e3a4e (patch) | |
| tree | 8653874b6a0f4140d9a7fc3e1a65052130db68ed | |
| parent | 45623f0b0c64871c73f79a02153707dcc1b2728f (diff) | |
| parent | 666f92f981e7828e4a48b667c121a423227d5bc6 (diff) | |
Merge "Fix NPE in LogicalDisplayMapper" into main
| -rw-r--r-- | services/core/java/com/android/server/display/LogicalDisplayMapper.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/services/core/java/com/android/server/display/LogicalDisplayMapper.java b/services/core/java/com/android/server/display/LogicalDisplayMapper.java index bcb600d0f91c..06a910396d6c 100644 --- a/services/core/java/com/android/server/display/LogicalDisplayMapper.java +++ b/services/core/java/com/android/server/display/LogicalDisplayMapper.java @@ -355,8 +355,8 @@ class LogicalDisplayMapper implements DisplayDeviceRepository.Listener { public SparseArray<int[]> getDisplayIdsByGroupIdLocked() { SparseArray<int[]> displayIdsByGroupIds = new SparseArray<>(); for (int i = 0; i < mDisplayGroups.size(); i++) { - int groupId = mDisplayGroups.get(i).getGroupId(); - displayIdsByGroupIds.put(groupId, getDisplayIdsForGroupLocked(groupId)); + final int displayGroupId = mDisplayGroups.keyAt(i); + displayIdsByGroupIds.put(displayGroupId, getDisplayIdsForGroupLocked(displayGroupId)); } return displayIdsByGroupIds; } |