次の方法で共有


WindowManager.PropertyCameraCompatEnableRefreshViaPause Field

Definition

Caution

Use 'Android.Views.IWindowManager.PropertyCameraCompatEnableRefreshViaPause'. This class will be removed in a future release.

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the activity should be or shouldn't be "refreshed" after the camera compatibility force rotation treatment using "paused -> resumed" cycle rather than "stopped -> resumed".

[Android.Runtime.Register("PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE", ApiSince=34)]
[System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCameraCompatEnableRefreshViaPause'. This class will be removed in a future release.")]
public const string PropertyCameraCompatEnableRefreshViaPause;
[<Android.Runtime.Register("PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE", ApiSince=34)>]
[<System.Obsolete("Use 'Android.Views.IWindowManager.PropertyCameraCompatEnableRefreshViaPause'. This class will be removed in a future release.")>]
val mutable PropertyCameraCompatEnableRefreshViaPause : string

Field Value

Attributes

Remarks

Application level android.content.pm.PackageManager.Property PackageManager .Property for an app to inform the system that the activity should be or shouldn't be "refreshed" after the camera compatibility force rotation treatment using "paused -> resumed" cycle rather than "stopped -> resumed".

The camera compatibility treatment aligns orientations of portrait app window and natural orientation of the device and set opposite to natural orientation for a landscape app window. Mismatch between them can lead to camera issues like sideways or stretched viewfinder since this is one of the strongest assumptions that apps make when they implement camera previews. Since app and natural display orientations aren't guaranteed to match, the rotation can cause letterboxing. The forced rotation is triggered as soon as app opens to camera and is removed once camera is closed.

Force rotation is followed by the "Refresh" of the activity by going through "resumed -> ... -> stopped -> ... -> resumed" cycle (by default) or "resumed -> paused -> resumed" cycle (if overridden by device manufacturers or using this property). This allows to clear cached values in apps (e.g., display or camera rotation) that influence camera preview and can lead to sideways or stretching issues persisting even after force rotation.

The camera compatibility can be enabled by device manufacturers on the displays that have ignoreOrientationRequest display setting enabled (enables compatibility mode for fixed orientation, see Enhanced letterboxing for more details).

Device manufacturers can override packages to "refresh" via "resumed -> paused -> resumed" cycle using their discretion to improve display compatibility.

With this property set to true, the system will "refresh" activity after the force rotation treatment using "resumed -> paused -> resumed" cycle.

With this property set to false, the system will not "refresh" activity after the force rotation treatment using "resumed -> paused -> resumed" cycle even if the device manufacturer adds the corresponding override.

<b>Syntax:</b>

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

Java documentation for android.view.WindowManager.PROPERTY_CAMERA_COMPAT_ENABLE_REFRESH_VIA_PAUSE.

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