Add one more field in DecryptHandle to support bug 4126624

Change-Id: Ic7ea5fd211c4f8283de8fdf722f89b6a94e5750b
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp
index 16f1dd0..346934b 100644
--- a/drm/common/IDrmManagerService.cpp
+++ b/drm/common/IDrmManagerService.cpp
@@ -51,6 +51,13 @@
         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 @@
 
     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 e8ec953..454fc99 100644
--- a/include/drm/drm_framework_common.h
+++ b/include/drm/drm_framework_common.h
@@ -296,6 +296,12 @@
      */
     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),