- Add two sanity checks.
- Remove one unnecessary line.
- Clear the extendedData vector in DecryptHandle.
Change-Id: I2610c6d68f12d48cb69323a5eb2ae4b3b3e44dff
diff --git a/drm/common/DrmSupportInfo.cpp b/drm/common/DrmSupportInfo.cpp
index 3dee435..5400bdd 100644
--- a/drm/common/DrmSupportInfo.cpp
+++ b/drm/common/DrmSupportInfo.cpp
@@ -43,6 +43,10 @@
}
bool DrmSupportInfo::isSupportedMimeType(const String8& mimeType) const {
+ if (String8("") == mimeType) {
+ return false;
+ }
+
for (unsigned int i = 0; i < mMimeTypeVector.size(); i++) {
const String8 item = mMimeTypeVector.itemAt(i);
diff --git a/drm/common/IDrmManagerService.cpp b/drm/common/IDrmManagerService.cpp
index 458f1b6..2d8e877 100644
--- a/drm/common/IDrmManagerService.cpp
+++ b/drm/common/IDrmManagerService.cpp
@@ -107,6 +107,7 @@
handle->decryptInfo = NULL;
}
handle->copyControlVector.clear();
+ handle->extendedData.clear();
}
int BpDrmManagerService::addUniqueId(int uniqueId) {