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

Commit df4a15b5 authored by Chris Li's avatar Chris Li
Browse files

Allow non-resizable apps in split-screen (5/n)

Replace usages of DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM with
DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW so that we can use one
setting to control all multi window mode

Bug: 176061101
Test: pass existing
Change-Id: I873b4902f3995815721401b30236919ffdbc6a82
parent dfb9bb76
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -10511,18 +10511,6 @@ public final class Settings {
        public static final String DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS =
                "force_desktop_mode_on_external_displays";
        /**
         * Whether to allow non-resizable apps to be freeform.
         *
         * TODO(b/176061101) remove after update all usages
         * @deprecated use {@link #DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW}
         * @hide
         */
        @Deprecated
        @Readable
        public static final String DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM =
                "enable_sizecompat_freeform";
        /**
         * Whether to allow non-resizable apps to be shown in multi-window. The app will be
         * letterboxed if the request orientation is not met, and will be shown in size-compat
+2 −1
Original line number Diff line number Diff line
@@ -282,7 +282,8 @@ message GlobalSettingsProto {
        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 SettingProto enable_sizecompat_freeform = 7 [ (android.privacy).dest = DEST_AUTOMATIC ];
        // Deprecated, use enable_non_resizable_multi_window
        optional SettingProto enable_sizecompat_freeform = 7 [ (android.privacy).dest = DEST_AUTOMATIC, deprecated = true ];
        optional SettingProto enable_non_resizable_multi_window = 8 [ (android.privacy).dest = DEST_AUTOMATIC ];
    }
    optional Development development = 39;
+0 −3
Original line number Diff line number Diff line
@@ -550,9 +550,6 @@ class SettingsProtoDumpUtil {
        dumpSetting(s, p,
                Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS,
                GlobalSettingsProto.Development.FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS);
        dumpSetting(s, p,
                Settings.Global.DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM,
                GlobalSettingsProto.Development.ENABLE_SIZECOMPAT_FREEFORM);
        dumpSetting(s, p,
                Settings.Global.DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW,
                GlobalSettingsProto.Development.ENABLE_NON_RESIZABLE_MULTI_WINDOW);
+0 −1
Original line number Diff line number Diff line
@@ -227,7 +227,6 @@ public class SettingsBackupTest {
                    Settings.Global.DEVELOPMENT_FORCE_DESKTOP_MODE_ON_EXTERNAL_DISPLAYS,
                    Settings.Global.DEVELOPMENT_FORCE_RESIZABLE_ACTIVITIES,
                    Settings.Global.DEVELOPMENT_FORCE_RTL,
                    Settings.Global.DEVELOPMENT_ENABLE_SIZECOMPAT_FREEFORM,
                    Settings.Global.DEVELOPMENT_ENABLE_NON_RESIZABLE_MULTI_WINDOW,
                    Settings.Global.DEVELOPMENT_RENDER_SHADOWS_IN_COMPOSITOR,
                    Settings.Global.DEVELOPMENT_USE_BLAST_ADAPTER_SV,
+1 −1
Original line number Diff line number Diff line
@@ -808,7 +808,7 @@ class ActivityClientController extends IActivityClientController.Stub {

                if (rootTask.inFreeformWindowingMode()) {
                    rootTask.setWindowingMode(WINDOWING_MODE_FULLSCREEN);
                } else if (!mService.mSizeCompatFreeform && r.inSizeCompatMode()) {
                } else if (!mService.mSupportsNonResizableMultiWindow && r.inSizeCompatMode()) {
                    throw new IllegalStateException("Size-compat windows are currently not"
                            + "freeform-enabled");
                } else if (rootTask.getParent().inFreeformWindowingMode()) {
Loading