diff options
| author | 2023-11-30 03:49:30 +0000 | |
|---|---|---|
| committer | 2023-11-30 03:49:30 +0000 | |
| commit | bc251e7a8f6125ca521ab1ccc4015860bfeb640b (patch) | |
| tree | ed39719586afef28ac04144d294edae1ee8ecefd | |
| parent | eb5a5da9c2edf2f3048d0054752a4ec9d25e3257 (diff) | |
Fixes NullPointerException if display address is null
Fixes: 304426380
Test: Manual
Change-Id: I83cc79f924a1968225d9da85d6a69fbe649be934
| -rw-r--r-- | libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java index 15d14e87fcf6..b315f94b5d00 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java @@ -241,7 +241,7 @@ public class WindowAreaComponentImpl implements WindowAreaComponent, for (int i = 0; i < displays.length; i++) { DisplayAddress.Physical address = (DisplayAddress.Physical) displays[i].getAddress(); - if (mRearDisplayAddress == address.getPhysicalDisplayId()) { + if (address != null && mRearDisplayAddress == address.getPhysicalDisplayId()) { rearDisplayMetrics = new DisplayMetrics(); final Display rearDisplay = displays[i]; |