diff options
| author | 2023-06-15 22:32:22 +0000 | |
|---|---|---|
| committer | 2023-06-15 22:32:22 +0000 | |
| commit | 1f61ce8436fb14ae5a1c6a93976649abe140da4c (patch) | |
| tree | 9ab9c598b83508a7badb5500ec9f0732f21b71ff /libs | |
| parent | a3aa00e29c3427056326130ec3a497c996c605f0 (diff) | |
| parent | a51adc9ca7e4b3787766f3d1517a6d5ae76a1150 (diff) | |
Merge "Move local variable to more localized scope" into udc-dev
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java | 4 |
1 files changed, 3 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 f9aa1bd98e38..1e6e50359cf3 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java @@ -239,7 +239,7 @@ public class WindowAreaComponentImpl implements WindowAreaComponent, // display state, so we have to look through all displays to match the address final Display[] displays = mDisplayManager.getDisplays( DisplayManager.DISPLAY_CATEGORY_ALL_INCLUDING_DISABLED); - final Display defaultDisplay = mDisplayManager.getDisplay(Display.DEFAULT_DISPLAY); + for (int i = 0; i < displays.length; i++) { DisplayAddress.Physical address = @@ -255,6 +255,8 @@ public class WindowAreaComponentImpl implements WindowAreaComponent, // TODO(b/287170025): This should be something like if (!rearDisplay.isEnabled) // instead. Currently when the rear display is disabled, its state is STATE_OFF. if (rearDisplay.getDisplayId() != Display.DEFAULT_DISPLAY) { + final Display defaultDisplay = mDisplayManager + .getDisplay(Display.DEFAULT_DISPLAY); rotateRearDisplayMetricsIfNeeded(defaultDisplay.getRotation(), rearDisplay.getRotation(), rearDisplayMetrics); } |