Dil

VirtualDisplayFlags Enum

Definition

This enumeration supports a bitwise combination of its member values.

[System.Flags]
public enum VirtualDisplayFlags
[<System.Flags>]
type VirtualDisplayFlags = 
Inheritance
VirtualDisplayFlags
Attributes

Fields

Name Value Description
Public 1

Virtual display flag: Create a public display.

Public virtual displays

When this flag is set, the virtual display is public.

A public virtual display behaves just like most any other display that is connected to the system such as an external or wireless display. Applications can open windows on the display and the system may mirror the contents of other displays onto it.

Creating a public virtual display that isn't restricted to own-content only implicitly creates an auto-mirroring display. See VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR for restrictions on who is allowed to create an auto-mirroring display.

When this flag is not set, the virtual display is private as defined by the Display.FLAG_PRIVATE display flag.

A private virtual display belongs to the application that created it. Only the owner of a private virtual display and the apps that are already on that display are allowed to place windows upon it. More precisely, the only processes that are allowed to enumerate or interact with the private display are those that have the same UID as the application that originally created the private virtual display or as the activities that are already on that display.

Android reference for android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC.

Presentation 2

Virtual display flag: Create a presentation display.

Presentation virtual displays

When this flag is set, the virtual display is registered as a presentation display in the presentation display category. Applications may automatically project their content to presentation displays to provide richer second screen experiences.

When this flag is not set, the virtual display is not registered as a presentation display. Applications can still project their content on the display but they will typically not do so automatically. This option is appropriate for more special-purpose displays.

Android reference for android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_PRESENTATION.

Secure 4

Virtual display flag: Create a secure display.

Secure virtual displays

When this flag is set, the virtual display is considered secure as defined by the Display.FLAG_SECURE display flag. The caller promises to take reasonable measures, such as over-the-air encryption, to prevent the contents of the display from being intercepted or recorded on a persistent medium.

Creating a secure virtual display requires the CAPTURE_SECURE_VIDEO_OUTPUT permission. This permission is reserved for use by system components and is not available to third-party applications.

When this flag is not set, the virtual display is considered unsecure. The content of secure windows will be blanked if shown on this display.

Android reference for android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE.

OwnContentOnly 8

Virtual display flag: Only show this display's own content; do not mirror the content of another display.

This flag is used in conjunction with VIRTUAL_DISPLAY_FLAG_PUBLIC. Ordinarily public virtual displays will automatically mirror the content of the default display if they have no windows of their own. When this flag is specified, the virtual display will only ever show its own content and will be blanked instead if it has no windows.

This flag is mutually exclusive with VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR. If both flags are specified then the own-content only behavior will be applied.

This behavior of this flag is implied whenever neither VIRTUAL_DISPLAY_FLAG_PUBLIC nor VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR have been set. This flag is only required to override the default behavior when creating a public display.

Android reference for android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY.

AutoMirror 16

Virtual display flag: Allows content to be mirrored on private displays when no content is being shown.

This flag is mutually exclusive with VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY. If both flags are specified then the own-content only behavior will be applied.

The behavior of this flag is implied whenever VIRTUAL_DISPLAY_FLAG_PUBLIC is set and VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY has not been set. This flag is only required to override the default behavior when creating a private display.

Creating an auto-mirroring virtual display requires the CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT permission. These permissions are reserved for use by system components and are not available to third-party applications. Alternatively, an appropriate MediaProjection may be used to create an auto-mirroring virtual display.

Android reference for android.hardware.display.DisplayManager.VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR.

Remarks

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