diff options
author | Chong Zhang <chz@google.com> | 2013-09-03 14:35:37 -0700 |
---|---|---|
committer | Chong Zhang <chz@google.com> | 2013-09-03 16:02:35 -0700 |
commit | ec3acca4a75fc4adc076b56751124f507b419622 (patch) | |
tree | d8e15b4acf4de74c3edcdad49f3528ca668fc2a1 /media/libmedia | |
parent | 4585e8f0ff47580fdb81ed8652bde32db1770050 (diff) | |
download | frameworks_av-ec3acca4a75fc4adc076b56751124f507b419622.zip frameworks_av-ec3acca4a75fc4adc076b56751124f507b419622.tar.gz frameworks_av-ec3acca4a75fc4adc076b56751124f507b419622.tar.bz2 |
wifi-display: do not use HDCP's encryptNative method if its unsupported
Bug: 10609422
Change-Id: I005f1d04a4191b1503b5f3e895a98b8d6560c402
Diffstat (limited to 'media/libmedia')
-rw-r--r-- | media/libmedia/IHDCP.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
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<IHDCP> { 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(); |