diff options
| -rw-r--r-- | libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java | 7 |
1 files changed, 5 insertions, 2 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 1e6e50359cf3..0112e32e05a7 100644 --- a/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java +++ b/libs/WindowManager/Jetpack/src/androidx/window/extensions/area/WindowAreaComponentImpl.java @@ -518,8 +518,11 @@ public class WindowAreaComponentImpl implements WindowAreaComponent, return WindowAreaComponent.STATUS_UNSUPPORTED; } - if (mCurrentDeviceState == mConcurrentDisplayState - || !ArrayUtils.contains(mCurrentSupportedDeviceStates, mConcurrentDisplayState) + if (mCurrentDeviceState == mConcurrentDisplayState) { + return WindowAreaComponent.STATUS_ACTIVE; + } + + if (!ArrayUtils.contains(mCurrentSupportedDeviceStates, mConcurrentDisplayState) || isDeviceFolded()) { return WindowAreaComponent.STATUS_UNAVAILABLE; } |