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

Commit e7df3755 authored by Vladimir Komsiyski's avatar Vladimir Komsiyski Committed by Android (Google) Code Review
Browse files

Merge "Disable desktop mode on VDM displays" into main

parents a76332da c17c12c0
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -5775,14 +5775,20 @@ class DisplayContent extends RootDisplayArea implements WindowManagerPolicy.Disp
    }

    /**
     * This is the development option to force enable desktop mode on all secondary public displays.
     * This is the development option to force enable desktop mode on all secondary public displays
     * that are not owned by a virtual device.
     * When this is enabled, it also force enable system decorations on those displays.
     *
     * If we need a per-display config to enable desktop mode for production, that config should
     * also check {@link #isSystemDecorationsSupported()} to avoid breaking any security policy.
     */
    boolean isPublicSecondaryDisplayWithDesktopModeForceEnabled() {
        return mWmService.mForceDesktopModeOnExternalDisplays && !isDefaultDisplay && !isPrivate();
        if (!mWmService.mForceDesktopModeOnExternalDisplays || isDefaultDisplay || isPrivate()) {
            return false;
        }
        // Desktop mode is not supported on virtual devices.
        int deviceId = mRootWindowContainer.mTaskSupervisor.getDeviceIdForDisplayId(mDisplayId);
        return deviceId == Context.DEVICE_ID_DEFAULT;
    }

    /**