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

Commit a97a01e5 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Added supports-split-screen-multi-window command to am"

parents b9ecda6d 626e0cc0
Loading
Loading
Loading
Loading
+10 −0
Original line number Original line Diff line number Diff line
@@ -1001,6 +1001,16 @@ public class ActivityManager {
                    com.android.internal.R.bool.config_supportsMultiWindow);
                    com.android.internal.R.bool.config_supportsMultiWindow);
    }
    }


    /**
     * Returns true if the system supports split screen multi-window.
     * @hide
     */
    static public boolean supportsSplitScreenMultiWindow() {
        return supportsMultiWindow()
                && Resources.getSystem().getBoolean(
                    com.android.internal.R.bool.config_supportsSplitScreenMultiWindow);
    }

    /**
    /**
     * Information you can set and retrieve about the current activity within the recent task list.
     * Information you can set and retrieve about the current activity within the recent task list.
     */
     */
+1 −0
Original line number Original line Diff line number Diff line
@@ -65,4 +65,5 @@


    <!-- The small screens of watch devices makes multi-window support undesireable. -->
    <!-- The small screens of watch devices makes multi-window support undesireable. -->
    <bool name="config_supportsMultiWindow">false</bool>
    <bool name="config_supportsMultiWindow">false</bool>
    <bool name="config_supportsSplitScreenMultiWindow">false</bool>
</resources>
</resources>
+3 −0
Original line number Original line Diff line number Diff line
@@ -2568,6 +2568,9 @@
         E.g. freeform, split-screen, picture-in-picture. -->
         E.g. freeform, split-screen, picture-in-picture. -->
    <bool name="config_supportsMultiWindow">true</bool>
    <bool name="config_supportsMultiWindow">true</bool>


    <!-- True if the device supports split screen as a form of multi-window. -->
    <bool name="config_supportsSplitScreenMultiWindow">true</bool>

    <!-- True if the device requires AppWidgetService even if it does not have
    <!-- True if the device requires AppWidgetService even if it does not have
         the PackageManager.FEATURE_APP_WIDGETS feature -->
         the PackageManager.FEATURE_APP_WIDGETS feature -->
    <bool name="config_enableAppWidgetService">false</bool>
    <bool name="config_enableAppWidgetService">false</bool>
+1 −0
Original line number Original line Diff line number Diff line
@@ -307,6 +307,7 @@
  <java-symbol type="bool" name="config_supportAudioSourceUnprocessed" />
  <java-symbol type="bool" name="config_supportAudioSourceUnprocessed" />
  <java-symbol type="bool" name="config_freeformWindowManagement" />
  <java-symbol type="bool" name="config_freeformWindowManagement" />
  <java-symbol type="bool" name="config_supportsMultiWindow" />
  <java-symbol type="bool" name="config_supportsMultiWindow" />
  <java-symbol type="bool" name="config_supportsSplitScreenMultiWindow" />
  <java-symbol type="bool" name="config_guestUserEphemeral" />
  <java-symbol type="bool" name="config_guestUserEphemeral" />
  <java-symbol type="bool" name="config_localDisplaysMirrorContent" />
  <java-symbol type="bool" name="config_localDisplaysMirrorContent" />
  <java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" />
  <java-symbol type="integer" name="config_defaultDisplayDefaultColorMode" />
+4 −0
Original line number Original line Diff line number Diff line
@@ -1378,6 +1378,7 @@ public class ActivityManagerService extends IActivityManager.Stub
    boolean mAlwaysFinishActivities = false;
    boolean mAlwaysFinishActivities = false;
    boolean mForceResizableActivities;
    boolean mForceResizableActivities;
    boolean mSupportsMultiWindow;
    boolean mSupportsMultiWindow;
    boolean mSupportsSplitScreenMultiWindow;
    boolean mSupportsFreeformWindowManagement;
    boolean mSupportsFreeformWindowManagement;
    boolean mSupportsPictureInPicture;
    boolean mSupportsPictureInPicture;
    boolean mSupportsLeanbackOnly;
    boolean mSupportsLeanbackOnly;
@@ -13141,6 +13142,8 @@ public class ActivityManagerService extends IActivityManager.Stub
                mContext.getPackageManager().hasSystemFeature(FEATURE_PICTURE_IN_PICTURE);
                mContext.getPackageManager().hasSystemFeature(FEATURE_PICTURE_IN_PICTURE);
        final boolean supportsMultiWindow = ActivityManager.supportsMultiWindow();
        final boolean supportsMultiWindow = ActivityManager.supportsMultiWindow();
        final boolean supportsSplitScreenMultiWindow =
                ActivityManager.supportsSplitScreenMultiWindow();
        final String debugApp = Settings.Global.getString(resolver, DEBUG_APP);
        final String debugApp = Settings.Global.getString(resolver, DEBUG_APP);
        final boolean waitForDebugger = Settings.Global.getInt(resolver, WAIT_FOR_DEBUGGER, 0) != 0;
        final boolean waitForDebugger = Settings.Global.getInt(resolver, WAIT_FOR_DEBUGGER, 0) != 0;
        final boolean alwaysFinishActivities =
        final boolean alwaysFinishActivities =
@@ -13176,6 +13179,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                mSupportsFreeformWindowManagement = false;
                mSupportsFreeformWindowManagement = false;
                mSupportsPictureInPicture = false;
                mSupportsPictureInPicture = false;
            }
            }
            mSupportsSplitScreenMultiWindow = supportsSplitScreenMultiWindow;
            mWindowManager.setForceResizableTasks(mForceResizableActivities);
            mWindowManager.setForceResizableTasks(mForceResizableActivities);
            mWindowManager.setSupportsPictureInPicture(mSupportsPictureInPicture);
            mWindowManager.setSupportsPictureInPicture(mSupportsPictureInPicture);
            // This happens before any activities are started, so we can change global configuration
            // This happens before any activities are started, so we can change global configuration
Loading