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

Commit 03faa146 authored by Andrii Kulian's avatar Andrii Kulian Committed by Android (Google) Code Review
Browse files

Merge "Add dev option to force desktop mode"

parents 6ae76d0d 15cfb428
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -9174,6 +9174,13 @@ public final class Settings {
        public static final String DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT
                = "enable_freeform_support";
        /**
         * Whether to enable experimental desktop mode on secondary displays.
         * @hide
         */
        public static final String DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS =
                "force_desktop_mode_on_external_displays";
       /**
        * Whether user has enabled development settings.
        */
+1 −0
Original line number Diff line number Diff line
@@ -270,6 +270,7 @@ message GlobalSettingsProto {
        optional SettingProto enable_freeform_windows_support = 3 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto force_rtl = 4 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto emulate_display_cutout = 5 [ (android.privacy).dest = DEST_AUTOMATIC ];
        optional SettingProto force_desktop_mode_on_external_displays = 6 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional Development development = 39;

+1 −0
Original line number Diff line number Diff line
@@ -197,6 +197,7 @@ public class SettingsBackupTest {
                    Settings.Global.DESK_DOCK_SOUND,
                    Settings.Global.DESK_UNDOCK_SOUND,
                    Settings.Global.DEVELOPMENT_ENABLE_FREEFORM_WINDOWS_SUPPORT,
                    Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS,
                    Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES,
                    Settings.Global.DEVELOPMENT_FORCE_RTL,
                    Settings.Global.DEVELOPMENT_SETTINGS_ENABLED,
+3 −0
Original line number Diff line number Diff line
@@ -481,6 +481,9 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Global.EMULATE_DISPLAY_CUTOUT,
                GlobalSettingsProto.Development.EMULATE_DISPLAY_CUTOUT);
        dumpSetting(s, p,
                Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS,
                GlobalSettingsProto.Development.FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS);
        p.end(developmentToken);

        final long deviceToken = p.start(GlobalSettingsProto.DEVICE);
+3 −4
Original line number Diff line number Diff line
@@ -1103,13 +1103,12 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>
    }

    /**
     * Checks if system decorations should be shown on this display.
     *
     * @see Display#FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS
     */
    boolean supportsSystemDecorations() {
        return mDisplay.supportsSystemDecorations()
                // TODO (b/111363427): Remove this and set the new FLAG_SHOULD_SHOW_LAUNCHER flag
                // (b/114338689) whenever vr 2d display id is set.
                || mDisplayId == mSupervisor.mService.mVr2dDisplayId;
        return mWindowContainerController.supportsSystemDecorations();
    }

    @VisibleForTesting
Loading