summaryrefslogtreecommitdiff
path: root/core/java/android/content
diff options
context:
space:
mode:
Diffstat (limited to 'core/java/android/content')
-rw-r--r--core/java/android/content/pm/ActivityInfo.java43
1 files changed, 43 insertions, 0 deletions
diff --git a/core/java/android/content/pm/ActivityInfo.java b/core/java/android/content/pm/ActivityInfo.java
index fa9142ca9449..fc0e214a645f 100644
--- a/core/java/android/content/pm/ActivityInfo.java
+++ b/core/java/android/content/pm/ActivityInfo.java
@@ -961,6 +961,29 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
public @interface SizeChangesSupportMode {}
/**
+ * This change id forces the packages it is applied to never have Display API sandboxing
+ * applied for a letterbox or SCM activity. The Display APIs will continue to provide
+ * DisplayArea bounds.
+ * @hide
+ */
+ @ChangeId
+ @Overridable
+ @Disabled
+ @TestApi
+ public static final long NEVER_SANDBOX_DISPLAY_APIS = 184838306L; // buganizer id
+
+ /**
+ * This change id forces the packages it is applied to always have Display API sandboxing
+ * applied, regardless of windowing mode. The Display APIs will always provide the app bounds.
+ * @hide
+ */
+ @ChangeId
+ @Overridable
+ @Disabled
+ @TestApi
+ public static final long ALWAYS_SANDBOX_DISPLAY_APIS = 185004937L; // buganizer id
+
+ /**
* This change id is the gatekeeper for all treatments that force a given min aspect ratio.
* Enabling this change will allow the following min aspect ratio treatments to be applied:
* OVERRIDE_MIN_ASPECT_RATIO_MEDIUM
@@ -1325,6 +1348,26 @@ public class ActivityInfo extends ComponentInfo implements Parcelable {
return SIZE_CHANGES_UNSUPPORTED_METADATA;
}
+ /**
+ * Returns if the activity should never be sandboxed to the activity window bounds.
+ * @hide
+ */
+ public boolean neverSandboxDisplayApis() {
+ return CompatChanges.isChangeEnabled(NEVER_SANDBOX_DISPLAY_APIS,
+ applicationInfo.packageName,
+ UserHandle.getUserHandleForUid(applicationInfo.uid));
+ }
+
+ /**
+ * Returns if the activity should always be sandboxed to the activity window bounds.
+ * @hide
+ */
+ public boolean alwaysSandboxDisplayApis() {
+ return CompatChanges.isChangeEnabled(ALWAYS_SANDBOX_DISPLAY_APIS,
+ applicationInfo.packageName,
+ UserHandle.getUserHandleForUid(applicationInfo.uid));
+ }
+
/** @hide */
public void setMaxAspectRatio(float maxAspectRatio) {
this.mMaxAspectRatio = maxAspectRatio;