Merge "Use feature instead of hidden config for multi-display" into oc-dev am: 72790bade5
am: 2d27f1c538
Change-Id: I2f8c876f53c021e4eca8fb50b4de8f7d5390e673
This commit is contained in:
@@ -1117,16 +1117,6 @@ public class ActivityManager {
|
||||
com.android.internal.R.bool.config_supportsSplitScreenMultiWindow);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the system supports running activities on secondary displays.
|
||||
* @hide
|
||||
*/
|
||||
static public boolean supportsMultiDisplay() {
|
||||
return !isLowRamDeviceStatic()
|
||||
&& Resources.getSystem().getBoolean(
|
||||
com.android.internal.R.bool.config_supportsMultiDisplay);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the maximum number of actions that will be displayed in the picture-in-picture UI when
|
||||
* the user interacts with the activity currently in picture-in-picture mode.
|
||||
|
||||
@@ -155,6 +155,7 @@ public class ActivityOptions {
|
||||
|
||||
/**
|
||||
* The display id the activity should be launched into.
|
||||
* @see #setLaunchDisplayId(int)
|
||||
* @hide
|
||||
*/
|
||||
private static final String KEY_LAUNCH_DISPLAY_ID = "android.activity.launchDisplayId";
|
||||
@@ -1038,6 +1039,7 @@ public class ActivityOptions {
|
||||
* Gets the id of the display where activity should be launched.
|
||||
* @return The id of the display where activity should be launched,
|
||||
* {@link android.view.Display#INVALID_DISPLAY} if not set.
|
||||
* @see #setLaunchDisplayId(int)
|
||||
*/
|
||||
public int getLaunchDisplayId() {
|
||||
return mLaunchDisplayId;
|
||||
@@ -1045,6 +1047,12 @@ public class ActivityOptions {
|
||||
|
||||
/**
|
||||
* Sets the id of the display where activity should be launched.
|
||||
* An app can launch activities on public displays or private displays that are owned by the app
|
||||
* or where an app already has activities. Otherwise, trying to launch on a private display
|
||||
* or providing an invalid display id will result in an exception.
|
||||
* <p>
|
||||
* Setting launch display id will be ignored on devices that don't have
|
||||
* {@link android.content.pm.PackageManager#FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS}.
|
||||
* @param launchDisplayId The id of the display where the activity should be launched.
|
||||
* @return {@code this} {@link ActivityOptions} instance.
|
||||
*/
|
||||
|
||||
@@ -2292,6 +2292,14 @@ public abstract class PackageManager {
|
||||
@SdkConstant(SdkConstantType.FEATURE)
|
||||
public static final String FEATURE_PICTURE_IN_PICTURE = "android.software.picture_in_picture";
|
||||
|
||||
/**
|
||||
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
|
||||
* The device supports running activities on secondary displays.
|
||||
*/
|
||||
@SdkConstant(SdkConstantType.FEATURE)
|
||||
public static final String FEATURE_ACTIVITIES_ON_SECONDARY_DISPLAYS
|
||||
= "android.software.activities_on_secondary_displays";
|
||||
|
||||
/**
|
||||
* Feature for {@link #getSystemAvailableFeatures} and {@link #hasSystemFeature}:
|
||||
* The device supports creating secondary users and managed profiles via
|
||||
|
||||
Reference in New Issue
Block a user