WindowProperties

object WindowProperties


Window-related PackageManager.Property tags that can be defined in the app manifest file, AndroidManifest.xml.

Summary

Constants

const String

Application-level PackageManager.Property tag that specifies whether OEMs are permitted to provide activity embedding split-rule configurations on behalf of the app.

const String

Application level PackageManager tag that an app must specify to inform the system that the app is ActivityEmbedding split feature enabled.

const String

Application level PackageManager tag for an app to inform the system that the app can be opted-out from the compatibility treatment that avoids android.app.Activity.setRequestedOrientation loops.

const String

Application level PackageManager tag for an app to inform the system that the app should be opted-out from the compatibility override that changes the min aspect ratio.

const String

Application level PackageManager tag for an app to inform the system that the app should be opted-out from the compatibility overrides that change the resizability of the app.

Constants

PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE

Added in 1.1.0
const val PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDEString

Application-level PackageManager.Property tag that specifies whether OEMs are permitted to provide activity embedding split-rule configurations on behalf of the app.

If true, the system is permitted to override the app's windowing behavior and implement activity embedding split rules, such as displaying activities adjacent to each other. A system override informs the app that the activity embedding APIs are disabled so the app will not provide its own activity embedding rules, which would conflict with the system's rules.

If false, the system is not permitted to override the windowing behavior of the app. Set the property to false if the app provides its own activity embedding split rules, or if you want to prevent the system override for any other reason.

The default value is false.

Note: Refusal to permit the system override is not enforceable. OEMs can override the app's activity embedding implementation whether or not this property is specified and set to false. The property is, in effect, a hint to OEMs.

OEMs can implement activity embedding on any API level. The best practice for apps is to always explicitly set this property in the app manifest file regardless of targeted API level rather than rely on the default value.

Syntax:

<application>
<property
    android:name="android.window.PROPERTY_ACTIVITY_EMBEDDING_ALLOW_SYSTEM_OVERRIDE"
    android:value="true|false"/>
</application>

PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED

Added in 1.1.0
const val PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLEDString

Application level PackageManager tag that an app must specify to inform the system that the app is ActivityEmbedding split feature enabled. In other words, the ActivityEmbedding splits feature cannot be used if the app has no property set.

With this property, the system could provide custom behaviors for the apps that have ActivityEmbedding split feature enabled. For example, the fixed-portrait orientation requests of the activities could be ignored by the system in order to provide seamless ActivityEmbedding split experiences while holding the large-screen devices in landscape mode.

Syntax:

<application>
<property
    android:name="android.window.PROPERTY_ACTIVITY_EMBEDDING_SPLITS_ENABLED"
    android:value="true|false"/>
</application>

PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED

Added in 1.2.0
const val PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTEDString

Application level PackageManager tag for an app to inform the system that the app can be opted-out from the compatibility treatment that avoids android.app.Activity.setRequestedOrientation loops. The loop can be trigerred when ignoreOrientationRequest display setting is enabled on the device (enables compatibility mode for fixed orientation, see Enhanced letterboxing for more details). or by the landscape natural orientation of the device.

The system could ignore android.app.Activity.setRequestedOrientation call from an app if both of the following conditions are true:

  • Activity has requested orientation more than 2 times within 1-second timer

  • Activity is not letterboxed for fixed orientation

Setting this property to false informs the system that the app must be opted-out from the compatibility treatment even if the device manufacturer has opted the app into the treatment.

Not setting this property at all, or setting this property to true has no effect.

Syntax:

<application>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_IGNORING_ORIENTATION_REQUEST_WHEN_LOOP_DETECTED"
android:value="false" />
</application>

PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE

Added in 1.2.0
const val PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDEString

Application level PackageManager tag for an app to inform the system that the app should be opted-out from the compatibility override that changes the min aspect ratio.

When this compat override is enabled the min aspect ratio given in the app's manifest can be overridden by the device manufacturer using their discretion to improve display compatibility unless the app's manifest value is higher. This treatment will also apply if no min aspect ratio value is provided in the manifest. These treatments can apply only in specific cases (e.g. device is in portrait) or each time the app is displayed on screen.

Setting this property to false informs the system that the app must be opted-out from the compatibility treatment even if the device manufacturer has opted the app into the treatment.

Not setting this property at all, or setting this property to true has no effect.

Syntax:

<application>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_MIN_ASPECT_RATIO_OVERRIDE"
android:value="false" />
</application>

PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES

Added in 1.2.0
const val PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDESString

Application level PackageManager tag for an app to inform the system that the app should be opted-out from the compatibility overrides that change the resizability of the app.

When these compat overrides are enabled they force the packages they are applied to to be resizable / unresizable. If the app is forced to be resizable this won't change whether the app can be put into multi-windowing mode, but allow the app to resize without going into size-compat mode when the window container resizes, such as display size change or screen rotation.

Setting this property to false informs the system that the app must be opted-out from the compatibility treatment even if the device manufacturer has opted the app into the treatment.

Not setting this property at all, or setting this property to true has no effect.

Syntax:

<application>
<property
android:name="android.window.PROPERTY_COMPAT_ALLOW_RESIZEABLE_ACTIVITY_OVERRIDES"
android:value="false" />
</application>