Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8550e1e authored by Kenneth Ford's avatar Kenneth Ford Committed by Android (Google) Code Review
Browse files

Merge "Treat emulated only states as not folded in WindowAreaComponentImpl" into main

parents aa9c4d15 10e02496
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package androidx.window.extensions.area;

import static android.hardware.devicestate.DeviceState.PROPERTY_EMULATED_ONLY;
import static android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_DUAL_DISPLAY_INTERNAL_DEFAULT;
import static android.hardware.devicestate.DeviceState.PROPERTY_FEATURE_REAR_DISPLAY;
import static android.hardware.devicestate.DeviceState.PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY;
@@ -569,7 +570,8 @@ public class WindowAreaComponentImpl implements WindowAreaComponent,
    private boolean isDeviceFolded() {
        if (Flags.deviceStatePropertyApi()) {
            return mCurrentDeviceState.hasProperty(
                    PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY);
                    PROPERTY_FOLDABLE_DISPLAY_CONFIGURATION_OUTER_PRIMARY)
                    && !mCurrentDeviceState.hasProperty(PROPERTY_EMULATED_ONLY);
        } else {
            return ArrayUtils.contains(mFoldedDeviceStates, mCurrentDeviceState.getIdentifier());
        }