summaryrefslogtreecommitdiffstats
path: root/drm
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-06-22 14:55:16 -0700
committerGloria Wang <gwang@google.com>2011-06-22 16:36:24 -0700
commitab00df4d8585b181e9058eb1b9c7996aa3bbaeab (patch)
tree5e60b07a24b05d9c667df5946facb3b20b7c9454 /drm
parent6ef9a104959c1d15232fe3a319e4a270eed3ddb5 (diff)
downloadframeworks_av-ab00df4d8585b181e9058eb1b9c7996aa3bbaeab.zip
frameworks_av-ab00df4d8585b181e9058eb1b9c7996aa3bbaeab.tar.gz
frameworks_av-ab00df4d8585b181e9058eb1b9c7996aa3bbaeab.tar.bz2
- Add two sanity checks.
- Remove one unnecessary line. - Clear the extendedData vector in DecryptHandle. Change-Id: I2610c6d68f12d48cb69323a5eb2ae4b3b3e44dff
Diffstat (limited to 'drm')
-rw-r--r--drm/common/DrmSupportInfo.cpp4
-rw-r--r--drm/common/IDrmManagerService.cpp1
-rw-r--r--drm/libdrmframework/DrmManagerClientImpl.cpp1
3 files changed, 5 insertions, 1 deletions
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::operator==(const DrmSupportInfo& drmSupportInfo) const {
}
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 @@ static void clearDecryptHandle(DecryptHandle* handle) {
handle->decryptInfo = NULL;
}
handle->copyControlVector.clear();
+ handle->extendedData.clear();
}
int BpDrmManagerService::addUniqueId(int uniqueId) {
diff --git a/drm/libdrmframework/DrmManagerClientImpl.cpp b/drm/libdrmframework/DrmManagerClientImpl.cpp
index a57dd98..a36bd4a 100644
--- a/drm/libdrmframework/DrmManagerClientImpl.cpp
+++ b/drm/libdrmframework/DrmManagerClientImpl.cpp
@@ -145,7 +145,6 @@ DrmInfo* DrmManagerClientImpl::acquireDrmInfo(
status_t DrmManagerClientImpl::saveRights(int uniqueId, const DrmRights& drmRights,
const String8& rightsPath, const String8& contentPath) {
- status_t status = DRM_ERROR_UNKNOWN;
return getDrmManagerService()->saveRights(
uniqueId, drmRights, rightsPath, contentPath);
}