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

Commit 11f0d07d authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "VR Virtual Display created with SECURE flag."

parents b44381ad b6992f2d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1742,7 +1742,7 @@ public final class DisplayManagerService extends SystemService {
                            + "display.");
                }
            }
            if ((flags & VIRTUAL_DISPLAY_FLAG_SECURE) != 0) {
            if (callingUid != Process.SYSTEM_UID && (flags & VIRTUAL_DISPLAY_FLAG_SECURE) != 0) {
                if (!canProjectSecureVideo(projection)) {
                    throw new SecurityException("Requires CAPTURE_SECURE_VIDEO_OUTPUT "
                            + "or an appropriate MediaProjection token to create a "
+2 −0
Original line number Diff line number Diff line
@@ -296,6 +296,8 @@ class Vr2dDisplay {
            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_PUBLIC;
            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_OWN_CONTENT_ONLY;
            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_DESTROY_CONTENT_ON_REMOVAL;
            flags |= DisplayManager.VIRTUAL_DISPLAY_FLAG_SECURE;

            mVirtualDisplay = mDisplayManager.createVirtualDisplay(null /* projection */,
                    DISPLAY_NAME, mVirtualDisplayWidth, mVirtualDisplayHeight, mVirtualDisplayDpi,
                    null /* surface */, flags, null /* callback */, null /* handler */,