Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03fb9152 authored by Raj Kamal's avatar Raj Kamal Committed by Linux Build Service Account
Browse files

base: Do not overwrite VIRTUAL_DISPLAY_FLAG_* values

* VIRTUAL_DISPLAY_FLAG_SUPPORTS_PROTECTED_BUFFERS is
getting read as VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY.
This impacts the content seen on the VD device.

* Ensure that VIRTUAL_DISPLAY_FLAG_SUPPORTS_PROTECTED_BUFFERS
and VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY are different
values to prevent this.

CRs-Fixed: 653794

Change-Id: Ic0ea99a554ab26f2ff941304d1c6809f976076ef
parent 7f4f3fd6
Loading
Loading
Loading
Loading
+23 −22
Original line number Diff line number Diff line
@@ -175,28 +175,6 @@ public final class DisplayManager {
     * @see #createVirtualDisplay
     */
    public static final int VIRTUAL_DISPLAY_FLAG_SECURE = 1 << 2;
    /**
     * Virtual display flag: Create a secure display that uses HWC secure
     * blending.
     *
     * <h3>Secure virtual displays that use HWC secure blending</h3>
     * <p>
     * When this flag is set, the virtual display is considered secure and uses
     * HWC secure blending for composing the surfaces. 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.
     * </p>
     *
     * <h3>Secure virtual displays that don't use HWC secure blending</h3>
     * <p>
     * When this flag is not set, HWC secure blending is not supported for this
     * virtual display.
     * </p>
     *
     * @see Display#FLAG_SUPPORTS_PROTECTED_BUFFERS
     * @hide
     */
    public static final int VIRTUAL_DISPLAY_FLAG_SUPPORTS_PROTECTED_BUFFERS = 1 << 3;

    /**
     * Virtual display flag: Only show this display's own content; do not mirror
@@ -256,6 +234,29 @@ public final class DisplayManager {
     */
    public static final int VIRTUAL_DISPLAY_FLAG_AUTO_MIRROR = 1 << 4;

    /**
     * Virtual display flag: Create a secure display that uses HWC secure
     * blending.
     *
     * <h3>Secure virtual displays that use HWC secure blending</h3>
     * <p>
     * When this flag is set, the virtual display is considered secure and uses
     * HWC secure blending for composing the surfaces. 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.
     * </p>
     *
     * <h3>Secure virtual displays that don't use HWC secure blending</h3>
     * <p>
     * When this flag is not set, HWC secure blending is not supported for this
     * virtual display.
     * </p>
     *
     * @see Display#FLAG_SUPPORTS_PROTECTED_BUFFERS
     * @hide
     */
    public static final int VIRTUAL_DISPLAY_FLAG_SUPPORTS_PROTECTED_BUFFERS = 1 << 5;

    /** @hide */
    public DisplayManager(Context context) {
        mContext = context;