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

Commit 879a8ab8 authored by Arthur Hung's avatar Arthur Hung
Browse files

Fix ActivityManagerVrDisplayTests flacky

DisplayPolicy would decide if the external display should
support navigation bar by checking supportsSystemDecorations.
For VR virtual display, it will be used to run and render
2D app within a VR experience, and it shouldn't support
the system decoration.

Bug: 128313423
Test: atest ActivityManagerVrDisplayTests
Test: atest ActivityManagerMultiDisplayTests
Change-Id: I2594ac88877e157fe091c0c98b1098885d29bde6
parent d55e1b17
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -4885,12 +4885,11 @@ class DisplayContent extends WindowContainer<DisplayContent.DisplayChildWindowCo
     * @see Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS
     */
    boolean supportsSystemDecorations() {
        return mWmService.mDisplayWindowSettings.shouldShowSystemDecorsLocked(this)
        return (mWmService.mDisplayWindowSettings.shouldShowSystemDecorsLocked(this)
                || (mDisplay.getFlags() & FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS) != 0
                // TODO (b/111363427): Remove this and set the new FLAG_SHOULD_SHOW_LAUNCHER flag
                // whenever vr 2d display id is set.
                || mDisplayId == mWmService.mVr2dDisplayId
                || mWmService.mForceDesktopModeOnExternalDisplays;
                || mWmService.mForceDesktopModeOnExternalDisplays)
                // VR virtual display will be used to run and render 2D app within a VR experience.
                && mDisplayId != mWmService.mVr2dDisplayId;
    }

    /**