From 13f7fe763b9ad52fc27f21ed923c46b9555a321f Mon Sep 17 00:00:00 2001 From: Henrik B Andersson Date: Fri, 26 Oct 2012 15:15:15 +0200 Subject: Fix for not ending up in an eternal loop in DrmManager. In the original code a random number is used to get try to find an empty slot in the list of free DRM id's. When you reached the limit of 0xfff id's you ended up in an eternal loop causing ANRs. Updated by James Dong . Change-Id: I70176cc3f770223c4a8060f9739fe2bc03a703d9 --- drm/libdrmframework/include/DrmManager.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drm/libdrmframework/include') diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h index 491e8f7..8ab693f 100644 --- a/drm/libdrmframework/include/DrmManager.h +++ b/drm/libdrmframework/include/DrmManager.h @@ -144,7 +144,11 @@ private: bool canHandle(int uniqueId, const String8& path); private: - Vector mUniqueIdVector; + enum { + kMaxNumUniqueIds = 0x1000, + }; + + bool mUniqueIdArray[kMaxNumUniqueIds]; static const String8 EMPTY_STRING; int mDecryptSessionId; -- cgit v1.1 From f355f18aa2cc1706761e373fe19298a9ccc9c75a Mon Sep 17 00:00:00 2001 From: Jeff Tinker Date: Mon, 22 Jul 2013 15:54:42 -0700 Subject: Remove obsolete drm manager code bug: 9545965 Change-Id: Ia6e09efa826b1349d027045e782980daeb7d7596 --- drm/libdrmframework/include/DrmManager.h | 2 -- drm/libdrmframework/include/DrmManagerClientImpl.h | 11 ----------- drm/libdrmframework/include/DrmManagerService.h | 2 -- drm/libdrmframework/include/IDrmManagerService.h | 4 ---- 4 files changed, 19 deletions(-) (limited to 'drm/libdrmframework/include') diff --git a/drm/libdrmframework/include/DrmManager.h b/drm/libdrmframework/include/DrmManager.h index 8ab693f..e7cdd36 100644 --- a/drm/libdrmframework/include/DrmManager.h +++ b/drm/libdrmframework/include/DrmManager.h @@ -70,8 +70,6 @@ public: status_t setDrmServiceListener( int uniqueId, const sp& drmServiceListener); - status_t installDrmEngine(int uniqueId, const String8& drmEngineFile); - DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action); DrmMetadata* getMetadata(int uniqueId, const String8* path); diff --git a/drm/libdrmframework/include/DrmManagerClientImpl.h b/drm/libdrmframework/include/DrmManagerClientImpl.h index 9b4c9ae..3400cb1 100644 --- a/drm/libdrmframework/include/DrmManagerClientImpl.h +++ b/drm/libdrmframework/include/DrmManagerClientImpl.h @@ -410,17 +410,6 @@ public: status_t notify(const DrmInfoEvent& event); private: - /** - * Install new DRM Engine Plug-in at the runtime - * - * @param[in] uniqueId Unique identifier for a session - * @param[in] drmEngine Shared Object(so) File in which DRM Engine defined - * @return status_t - * Returns DRM_NO_ERROR for success, DRM_ERROR_UNKNOWN for failure - */ - status_t installDrmEngine(int uniqueId, const String8& drmEngineFile); - -private: Mutex mLock; sp mOnInfoListener; diff --git a/drm/libdrmframework/include/DrmManagerService.h b/drm/libdrmframework/include/DrmManagerService.h index 0dfdca6..8bc59b4 100644 --- a/drm/libdrmframework/include/DrmManagerService.h +++ b/drm/libdrmframework/include/DrmManagerService.h @@ -57,8 +57,6 @@ public: status_t setDrmServiceListener( int uniqueId, const sp& drmServiceListener); - status_t installDrmEngine(int uniqueId, const String8& drmEngineFile); - DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action); DrmMetadata* getMetadata(int uniqueId, const String8* path); diff --git a/drm/libdrmframework/include/IDrmManagerService.h b/drm/libdrmframework/include/IDrmManagerService.h index 5a4d70a..fe55650 100644 --- a/drm/libdrmframework/include/IDrmManagerService.h +++ b/drm/libdrmframework/include/IDrmManagerService.h @@ -93,8 +93,6 @@ public: virtual status_t setDrmServiceListener( int uniqueId, const sp& infoListener) = 0; - virtual status_t installDrmEngine(int uniqueId, const String8& drmEngineFile) = 0; - virtual DrmConstraints* getConstraints( int uniqueId, const String8* path, const int action) = 0; @@ -185,8 +183,6 @@ public: virtual status_t setDrmServiceListener( int uniqueId, const sp& infoListener); - virtual status_t installDrmEngine(int uniqueId, const String8& drmEngineFile); - virtual DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action); virtual DrmMetadata* getMetadata(int uniqueId, const String8* path); -- cgit v1.1