From f0681b34dffc1510cbd9c3da5c3a7e695553fa8d Mon Sep 17 00:00:00 2001 From: Jeff Brown Date: Tue, 23 Oct 2012 17:35:57 -0700 Subject: Secure windows, secure surface views and secure displays. Add new API to determine whether a display is secure. Add new API to make a SurfaceView secure. Clarify documentation. Bug: 7368436 Change-Id: I7068c34c910e43b4bc72e43fa0dded59a25f0fe2 --- services/java/com/android/server/display/LocalDisplayAdapter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'services/java/com/android/server/display/LocalDisplayAdapter.java') diff --git a/services/java/com/android/server/display/LocalDisplayAdapter.java b/services/java/com/android/server/display/LocalDisplayAdapter.java index d6c5248..fa56b83 100644 --- a/services/java/com/android/server/display/LocalDisplayAdapter.java +++ b/services/java/com/android/server/display/LocalDisplayAdapter.java @@ -127,10 +127,12 @@ final class LocalDisplayAdapter extends DisplayAdapter { mInfo.height = mPhys.height; mInfo.refreshRate = mPhys.refreshRate; - // Assume that all built-in displays have secure output (eg. HDCP) and + // Assume that all built-in displays that have secure output (eg. HDCP) also // support compositing from gralloc protected buffers. - mInfo.flags = DisplayDeviceInfo.FLAG_SECURE - | DisplayDeviceInfo.FLAG_SUPPORTS_PROTECTED_BUFFERS; + if (mPhys.secure) { + mInfo.flags = DisplayDeviceInfo.FLAG_SECURE + | DisplayDeviceInfo.FLAG_SUPPORTS_PROTECTED_BUFFERS; + } if (mBuiltInDisplayId == Surface.BUILT_IN_DISPLAY_ID_MAIN) { mInfo.name = getContext().getResources().getString( -- cgit v1.1