summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/display/LocalDisplayAdapter.java
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2012-10-01 21:07:03 -0700
committerJeff Brown <jeffbrown@google.com>2012-10-02 16:25:10 -0700
commit77aebfdbae489c3712ae3f9bca29d01fb1f09dc2 (patch)
tree5f3cf170ce629f5b2f74374ea4b21197ed7a841d /services/java/com/android/server/display/LocalDisplayAdapter.java
parent4253abbcfa3165ad7d06c4de97cd780c4e96f94a (diff)
Add new Display API for secure video capabilities.
Added a new API to determine whether the display supports protected buffers so that an application can choose a different content stream or change how it decodes the content so that it will be viewable on the display. At present, wifi display does not fully support protected buffers although this may be enhanced in the future. Bug: 6986623 Change-Id: If53a53d72b0ec92753cc4b29f99fcb131e00449b
Diffstat (limited to 'services/java/com/android/server/display/LocalDisplayAdapter.java')
-rw-r--r--services/java/com/android/server/display/LocalDisplayAdapter.java10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/java/com/android/server/display/LocalDisplayAdapter.java b/services/java/com/android/server/display/LocalDisplayAdapter.java
index 9c5146382974..679a67e4dcb3 100644
--- a/services/java/com/android/server/display/LocalDisplayAdapter.java
+++ b/services/java/com/android/server/display/LocalDisplayAdapter.java
@@ -124,11 +124,16 @@ final class LocalDisplayAdapter extends DisplayAdapter {
mInfo.width = mPhys.width;
mInfo.height = mPhys.height;
mInfo.refreshRate = mPhys.refreshRate;
+
+ // Assume that all built-in displays have secure output (eg. HDCP) and
+ // support compositing from gralloc protected buffers.
+ mInfo.flags = DisplayDeviceInfo.FLAG_SECURE
+ | DisplayDeviceInfo.FLAG_SUPPORTS_PROTECTED_BUFFERS;
+
if (mBuiltInDisplayId == Surface.BUILT_IN_DISPLAY_ID_MAIN) {
mInfo.name = getContext().getResources().getString(
com.android.internal.R.string.display_manager_built_in_display_name);
- mInfo.flags = DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY
- | DisplayDeviceInfo.FLAG_SUPPORTS_SECURE_VIDEO_OUTPUT
+ mInfo.flags |= DisplayDeviceInfo.FLAG_DEFAULT_DISPLAY
| DisplayDeviceInfo.FLAG_SUPPORTS_ROTATION;
mInfo.densityDpi = (int)(mPhys.density * 160 + 0.5f);
mInfo.xDpi = mPhys.xDpi;
@@ -137,7 +142,6 @@ final class LocalDisplayAdapter extends DisplayAdapter {
} else {
mInfo.name = getContext().getResources().getString(
com.android.internal.R.string.display_manager_hdmi_display_name);
- mInfo.flags = DisplayDeviceInfo.FLAG_SUPPORTS_SECURE_VIDEO_OUTPUT;
mInfo.touch = DisplayDeviceInfo.TOUCH_EXTERNAL;
mInfo.setAssumedDensityForExternalDisplay(mPhys.width, mPhys.height);
}