From ec3acca4a75fc4adc076b56751124f507b419622 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Tue, 3 Sep 2013 14:35:37 -0700 Subject: wifi-display: do not use HDCP's encryptNative method if its unsupported Bug: 10609422 Change-Id: I005f1d04a4191b1503b5f3e895a98b8d6560c402 --- media/libmedia/IHDCP.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'media/libmedia') diff --git a/media/libmedia/IHDCP.cpp b/media/libmedia/IHDCP.cpp index a46ff91..1cf987a 100644 --- a/media/libmedia/IHDCP.cpp +++ b/media/libmedia/IHDCP.cpp @@ -30,6 +30,7 @@ enum { HDCP_SET_OBSERVER, HDCP_INIT_ASYNC, HDCP_SHUTDOWN_ASYNC, + HDCP_GET_CAPS, HDCP_ENCRYPT, HDCP_ENCRYPT_NATIVE, HDCP_DECRYPT, @@ -85,6 +86,13 @@ struct BpHDCP : public BpInterface { return reply.readInt32(); } + virtual uint32_t getCaps() { + Parcel data, reply; + data.writeInterfaceToken(IHDCP::getInterfaceDescriptor()); + remote()->transact(HDCP_GET_CAPS, data, &reply); + return reply.readInt32(); + } + virtual status_t encrypt( const void *inData, size_t size, uint32_t streamCTR, uint64_t *outInputCTR, void *outData) { @@ -222,6 +230,14 @@ status_t BnHDCP::onTransact( return OK; } + case HDCP_GET_CAPS: + { + CHECK_INTERFACE(IHDCP, data, reply); + + reply->writeInt32(getCaps()); + return OK; + } + case HDCP_ENCRYPT: { size_t size = data.readInt32(); -- cgit v1.1