Loading core/java/android/app/ActivityManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -1139,8 +1139,12 @@ public class ActivityManager { * E.g. freeform, split-screen, picture-in-picture. * @hide */ static public boolean supportsMultiWindow() { return !isLowRamDeviceStatic() static public boolean supportsMultiWindow(Context context) { // On watches, multi-window is used to present essential system UI, and thus it must be // supported regardless of device memory characteristics. boolean isWatch = context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_WATCH); return (!isLowRamDeviceStatic() || isWatch) && Resources.getSystem().getBoolean( com.android.internal.R.bool.config_supportsMultiWindow); } Loading @@ -1149,8 +1153,8 @@ public class ActivityManager { * Returns true if the system supports split screen multi-window. * @hide */ static public boolean supportsSplitScreenMultiWindow() { return supportsMultiWindow() static public boolean supportsSplitScreenMultiWindow(Context context) { return supportsMultiWindow(context) && Resources.getSystem().getBoolean( com.android.internal.R.bool.config_supportsSplitScreenMultiWindow); } Loading packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ public class RecentsViewTouchHandler { } mVisibleDockStates.clear(); if (ActivityManager.supportsMultiWindow() && !ssp.hasDockedTask() if (ActivityManager.supportsMultiWindow(mRv.getContext()) && !ssp.hasDockedTask() && mDividerSnapAlgorithm.isSplitScreenFeasible()) { Recents.logDockAttempt(mRv.getContext(), event.task.getTopComponent(), event.task.resizeMode); Loading packages/SystemUI/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ public class TaskViewAccessibilityDelegate extends View.AccessibilityDelegate { @Override public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(host, info); if (ActivityManager.supportsSplitScreenMultiWindow() if (ActivityManager.supportsSplitScreenMultiWindow(mTaskView.getContext()) && !Recents.getSystemServices().hasDockedTask()) { TaskStack.DockState[] dockStates = Recents.getConfiguration() .getDockStatesForCurrentOrientation(); Loading packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -545,7 +545,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks { } private boolean onLongPressRecents() { if (mRecents == null || !ActivityManager.supportsMultiWindow() if (mRecents == null || !ActivityManager.supportsMultiWindow(getContext()) || !mDivider.getView().getSnapAlgorithm().isSplitScreenFeasible()) { return false; } Loading services/core/java/com/android/server/am/ActivityManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -13924,9 +13924,9 @@ public class ActivityManagerService extends IActivityManager.Stub final boolean supportsPictureInPicture = mContext.getPackageManager().hasSystemFeature(FEATURE_PICTURE_IN_PICTURE); final boolean supportsMultiWindow = ActivityManager.supportsMultiWindow(); final boolean supportsMultiWindow = ActivityManager.supportsMultiWindow(mContext); final boolean supportsSplitScreenMultiWindow = ActivityManager.supportsSplitScreenMultiWindow(); ActivityManager.supportsSplitScreenMultiWindow(mContext); final boolean supportsMultiDisplay = mContext.getPackageManager() .hasSystemFeature(FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS); final String debugApp = Settings.Global.getString(resolver, DEBUG_APP); Loading
core/java/android/app/ActivityManager.java +8 −4 Original line number Diff line number Diff line Loading @@ -1139,8 +1139,12 @@ public class ActivityManager { * E.g. freeform, split-screen, picture-in-picture. * @hide */ static public boolean supportsMultiWindow() { return !isLowRamDeviceStatic() static public boolean supportsMultiWindow(Context context) { // On watches, multi-window is used to present essential system UI, and thus it must be // supported regardless of device memory characteristics. boolean isWatch = context.getPackageManager().hasSystemFeature( PackageManager.FEATURE_WATCH); return (!isLowRamDeviceStatic() || isWatch) && Resources.getSystem().getBoolean( com.android.internal.R.bool.config_supportsMultiWindow); } Loading @@ -1149,8 +1153,8 @@ public class ActivityManager { * Returns true if the system supports split screen multi-window. * @hide */ static public boolean supportsSplitScreenMultiWindow() { return supportsMultiWindow() static public boolean supportsSplitScreenMultiWindow(Context context) { return supportsMultiWindow(context) && Resources.getSystem().getBoolean( com.android.internal.R.bool.config_supportsSplitScreenMultiWindow); } Loading
packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java +1 −1 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ public class RecentsViewTouchHandler { } mVisibleDockStates.clear(); if (ActivityManager.supportsMultiWindow() && !ssp.hasDockedTask() if (ActivityManager.supportsMultiWindow(mRv.getContext()) && !ssp.hasDockedTask() && mDividerSnapAlgorithm.isSplitScreenFeasible()) { Recents.logDockAttempt(mRv.getContext(), event.task.getTopComponent(), event.task.resizeMode); Loading
packages/SystemUI/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java +1 −1 Original line number Diff line number Diff line Loading @@ -59,7 +59,7 @@ public class TaskViewAccessibilityDelegate extends View.AccessibilityDelegate { @Override public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) { super.onInitializeAccessibilityNodeInfo(host, info); if (ActivityManager.supportsSplitScreenMultiWindow() if (ActivityManager.supportsSplitScreenMultiWindow(mTaskView.getContext()) && !Recents.getSystemServices().hasDockedTask()) { TaskStack.DockState[] dockStates = Recents.getConfiguration() .getDockStatesForCurrentOrientation(); Loading
packages/SystemUI/src/com/android/systemui/statusbar/phone/NavigationBarFragment.java +1 −1 Original line number Diff line number Diff line Loading @@ -545,7 +545,7 @@ public class NavigationBarFragment extends Fragment implements Callbacks { } private boolean onLongPressRecents() { if (mRecents == null || !ActivityManager.supportsMultiWindow() if (mRecents == null || !ActivityManager.supportsMultiWindow(getContext()) || !mDivider.getView().getSnapAlgorithm().isSplitScreenFeasible()) { return false; } Loading
services/core/java/com/android/server/am/ActivityManagerService.java +2 −2 Original line number Diff line number Diff line Loading @@ -13924,9 +13924,9 @@ public class ActivityManagerService extends IActivityManager.Stub final boolean supportsPictureInPicture = mContext.getPackageManager().hasSystemFeature(FEATURE_PICTURE_IN_PICTURE); final boolean supportsMultiWindow = ActivityManager.supportsMultiWindow(); final boolean supportsMultiWindow = ActivityManager.supportsMultiWindow(mContext); final boolean supportsSplitScreenMultiWindow = ActivityManager.supportsSplitScreenMultiWindow(); ActivityManager.supportsSplitScreenMultiWindow(mContext); final boolean supportsMultiDisplay = mContext.getPackageManager() .hasSystemFeature(FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS); final String debugApp = Settings.Global.getString(resolver, DEBUG_APP);