Partager via


IWindowManager.PropertyCompatAllowOrientationOverride Field

Definition

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be excluded from the compatibility override for orientation set by the device manufacturer.

[Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE", ApiSince=34)]
public const string PropertyCompatAllowOrientationOverride;
[<Android.Runtime.Register("PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE", ApiSince=34)>]
val mutable PropertyCompatAllowOrientationOverride : string

Field Value

Attributes

Remarks

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the app should be excluded from the compatibility override for orientation set by the device manufacturer. When the orientation override is applied it can: <ul> <li>Replace the specific orientation requested by the app with another selected by the device manufacturer, e.g. replace undefined requested by the app with portrait. <li>Always use an orientation selected by the device manufacturer. <li>Do one of the above but only when camera connection is open. </ul>

This property is different from PROPERTY_COMPAT_IGNORE_REQUESTED_ORIENTATION (which is used to avoid orientation loops caused by the incorrect use of android.app.Activity#setRequestedOrientation) because this property overrides the app to an orientation selected by the device manufacturer rather than ignoring one of orientation requests coming from the app while respecting the previous one.

With this property set to true or unset, device manufacturers can override orientation for the app using their discretion to improve display compatibility.

With this property set to false, device manufactured per-app override for orientation won't be applied.

<b>Syntax:</b>

&lt;application&gt;
              &lt;property
                android:name="android.window.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE"
                android:value="true|false"/&gt;
            &lt;/application&gt;

Java documentation for android.view.WindowManager.PROPERTY_COMPAT_ALLOW_ORIENTATION_OVERRIDE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to