diff options
author | Gloria Wang <gwang@google.com> | 2011-03-22 11:43:09 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-03-22 11:43:09 -0700 |
commit | 0b500c2e81288190a6ce8b20c842a83a19e038b5 (patch) | |
tree | fdd0862b605eddcc1b20ba98ac3d73e936dd5340 | |
parent | 245af5e9ecb1881aa0b05f73bdbd249ec49a2af1 (diff) | |
parent | 52bee301b7ef870ec0acd86fda72352508369ce6 (diff) | |
download | frameworks_av-0b500c2e81288190a6ce8b20c842a83a19e038b5.zip frameworks_av-0b500c2e81288190a6ce8b20c842a83a19e038b5.tar.gz frameworks_av-0b500c2e81288190a6ce8b20c842a83a19e038b5.tar.bz2 |
am fc4c13be: am 01240177: am 3cc797b9: Merge "Add one more field in DecryptHandle to support bug 4126624" into honeycomb-mr1
* commit 'fc4c13be8ce8c2d05432d855c2c61548abef3385':
Add one more field in DecryptHandle to support bug 4126624
-rw-r--r-- | drm/common/IDrmManagerService.cpp | 19 | ||||
-rw-r--r-- | include/drm/drm_framework_common.h | 6 |
2 files changed, 23 insertions, 2 deletions
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp index 1f117c6..c37b4f8 100644 --- a/drm/common/IDrmManagerService.cpp +++ b/drm/common/IDrmManagerService.cpp @@ -51,6 +51,13 @@ static void writeDecrptHandleToParcelData( data->writeInt32(handle->copyControlVector.valueAt(i)); } + size = handle->extendedData.size(); + data->writeInt32(size); + for(int i = 0; i < size; i++) { + data->writeString8(handle->extendedData.keyAt(i)); + data->writeString8(handle->extendedData.valueAt(i)); + } + if (NULL != handle->decryptInfo) { data->writeInt32(handle->decryptInfo->decryptBufferLength); } else { @@ -71,8 +78,16 @@ static void readDecryptHandleFromParcelData( int size = data.readInt32(); for (int i = 0; i < size; i ++) { - handle->copyControlVector.add( - (DrmCopyControl)data.readInt32(), data.readInt32()); + DrmCopyControl key = (DrmCopyControl)data.readInt32(); + int value = data.readInt32(); + handle->copyControlVector.add(key, value); + } + + size = data.readInt32(); + for (int i = 0; i < size; i ++) { + String8 key = data.readString8(); + String8 value = data.readString8(); + handle->extendedData.add(key, value); } handle->decryptInfo = NULL; diff --git a/include/drm/drm_framework_common.h b/include/drm/drm_framework_common.h index 35d417b..d2d1d7e 100644 --- a/include/drm/drm_framework_common.h +++ b/include/drm/drm_framework_common.h @@ -297,6 +297,12 @@ public: */ KeyedVector<DrmCopyControl, int> copyControlVector; + /** + * Defines a vector for any extra data the DRM plugin wants to send + * to the native code + */ + KeyedVector<String8, String8> extendedData; + public: DecryptHandle(): decryptId(INVALID_VALUE), |