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

Commit 18200ee9 authored by Biswarup Pal's avatar Biswarup Pal Committed by Android (Google) Code Review
Browse files

Merge "Ignore home support for auto-mirror virtual displays" into main

parents 633a2489 2cce441b
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -450,11 +450,14 @@ public final class VirtualDisplayConfig implements Parcelable {
         * automatically launched upon the display creation. If unset or set to {@code false}, the
         * display will not host any activities upon creation.</p>
         *
         * <p>Note: setting to {@code true} requires the display to be trusted. If the display is
         * not trusted, this property is ignored.</p>
         * <p>Note: setting to {@code true} requires the display to be trusted and to not mirror
         * content of other displays. If the display is not trusted, or if it mirrors content of
         * other displays, this property is ignored.</p>
         *
         * @param isHomeSupported whether home activities are supported on the display
         * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_TRUSTED
         * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR
         * @see DisplayManager#VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY
         * @hide
         */
        @FlaggedApi(android.companion.virtual.flags.Flags.FLAG_VDM_CUSTOM_HOME)
+4 −0
Original line number Diff line number Diff line
@@ -1615,6 +1615,10 @@ public final class DisplayManagerService extends SystemService {
                if ((flags & VIRTUAL_DISPLAY_FLAG_TRUSTED) == 0) {
                    Slog.w(TAG, "Display created with home support but lacks "
                            + "VIRTUAL_DISPLAY_FLAG_TRUSTED, ignoring the home support request.");
                } else if ((flags & VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR) != 0) {
                    Slog.w(TAG, "Display created with home support but has "
                            + "VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR, ignoring the home support "
                            + "request.");
                } else {
                    mWindowManagerInternal.setHomeSupportedOnDisplay(displayUniqueId,
                            Display.TYPE_VIRTUAL, true);