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

Commit 9461ed6b authored by Lingyu Feng's avatar Lingyu Feng
Browse files

Ignore dev option force_desktop_mode_on_external_displays

when aflag enable_display_content_mode_management is enabled.

When dev option enable_display_content_mode_management is enabled,
DisplayContent#isSystemDecorationsSupported() alwasys return true. This
breaks the extended -> mirroring switch. The HOME activity remains on
the connected display even when the connected display is set to
mirroring mode.

Bug: 400344673
Test: manaually
Flag: com.android.server.display.feature.flags.enable_display_content_mode_management
Change-Id: I6c2304e1cc8488aac969ad788e84d5c90af0da19
parent 166bb0dc
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -5698,7 +5698,8 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
            // This display is configured to show system decorations.
            return true;
        }
        if (isPublicSecondaryDisplayWithDesktopModeForceEnabled()) {
        if (!DesktopExperienceFlags.ENABLE_DISPLAY_CONTENT_MODE_MANAGEMENT.isTrue()
                && isPublicSecondaryDisplayWithDesktopModeForceEnabled()) {
            if (com.android.window.flags.Flags.rearDisplayDisableForceDesktopSystemDecorations()) {
                // System decorations should not be forced on a rear display due to security
                // policies.