Udostępnij za pośrednictwem


Display.FlagSecure Field

Definition

Caution

This constant will be removed in the future version. Use Android.Views.DisplayFlags enum directly instead of this field.

Display flag: Indicates that the display has a secure video output and supports compositing secure surfaces.

[Android.Runtime.Register("FLAG_SECURE")]
[System.Obsolete("This constant will be removed in the future version. Use Android.Views.DisplayFlags enum directly instead of this field.", true)]
public const Android.Views.DisplayFlags FlagSecure = 2;
[<Android.Runtime.Register("FLAG_SECURE")>]
[<System.Obsolete("This constant will be removed in the future version. Use Android.Views.DisplayFlags enum directly instead of this field.", true)>]
val mutable FlagSecure : Android.Views.DisplayFlags

Field Value

Value = 2
Attributes

Remarks

Display flag: Indicates that the display has a secure video output and supports compositing secure surfaces.

If this flag is set then the display device has a secure video output and is capable of showing secure surfaces. It may also be capable of showing #FLAG_SUPPORTS_PROTECTED_BUFFERS protected buffers.

If this flag is not set then the display device may not have a secure video output; the user may see a blank region on the screen instead of the contents of secure surfaces or protected buffers.

Secure surfaces are used to prevent content rendered into those surfaces by applications from appearing in screenshots or from being viewed on non-secure displays. Protected buffers are used by secure video decoders for a similar purpose.

An application creates a window with a secure surface by specifying the WindowManager.LayoutParams#FLAG_SECURE window flag. Likewise, an application creates a SurfaceView with a secure surface by calling SurfaceView#setSecure before attaching the secure view to its containing window.

An application can use the absence of this flag as a hint that it should not create secure surfaces or protected buffers on this display because the content may not be visible. For example, if the flag is not set then the application may choose not to show content on this display, show an informative error message, select an alternate content stream or adopt a different strategy for decoding content that does not rely on secure surfaces or protected buffers.

Java documentation for android.view.Display.FLAG_SECURE.

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

See also