Loading drm/mediadrm/plugins/clearkey/DrmPlugin.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -39,9 +39,10 @@ status_t DrmPlugin::closeSession(const Vector<uint8_t>& sessionId) { sp<Session> session = mSessionLibrary->findSession(sessionId); if (session.get()) { mSessionLibrary->destroySession(session); } return android::OK; } return android::ERROR_DRM_SESSION_NOT_OPENED; } status_t DrmPlugin::getKeyRequest( const Vector<uint8_t>& scope, Loading drm/mediadrm/plugins/clearkey/SessionLibrary.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ SessionLibrary* SessionLibrary::get() { return sSingleton; } const sp<Session>& SessionLibrary::createSession() { sp<Session> SessionLibrary::createSession() { Mutex::Autolock lock(mSessionsLock); String8 sessionIdString = String8::format("%u", mNextSessionId); Loading @@ -57,9 +57,12 @@ const sp<Session>& SessionLibrary::createSession() { return mSessions.valueFor(sessionId); } const sp<Session>& SessionLibrary::findSession( sp<Session> SessionLibrary::findSession( const Vector<uint8_t>& sessionId) { Mutex::Autolock lock(mSessionsLock); if (mSessions.indexOfKey(sessionId) < 0) { return sp<Session>(NULL); } return mSessions.valueFor(sessionId); } Loading drm/mediadrm/plugins/clearkey/SessionLibrary.h +3 −3 Original line number Diff line number Diff line Loading @@ -31,9 +31,9 @@ class SessionLibrary { public: static SessionLibrary* get(); const android::sp<Session>& createSession(); android::sp<Session> createSession(); const android::sp<Session>& findSession( android::sp<Session> findSession( const android::Vector<uint8_t>& sessionId); void destroySession(const android::sp<Session>& session); Loading @@ -48,7 +48,7 @@ private: android::Mutex mSessionsLock; uint32_t mNextSessionId; android::DefaultKeyedVector<android::Vector<uint8_t>, android::sp<Session> > android::KeyedVector<android::Vector<uint8_t>, android::sp<Session> > mSessions; }; Loading Loading
drm/mediadrm/plugins/clearkey/DrmPlugin.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -39,9 +39,10 @@ status_t DrmPlugin::closeSession(const Vector<uint8_t>& sessionId) { sp<Session> session = mSessionLibrary->findSession(sessionId); if (session.get()) { mSessionLibrary->destroySession(session); } return android::OK; } return android::ERROR_DRM_SESSION_NOT_OPENED; } status_t DrmPlugin::getKeyRequest( const Vector<uint8_t>& scope, Loading
drm/mediadrm/plugins/clearkey/SessionLibrary.cpp +5 −2 Original line number Diff line number Diff line Loading @@ -43,7 +43,7 @@ SessionLibrary* SessionLibrary::get() { return sSingleton; } const sp<Session>& SessionLibrary::createSession() { sp<Session> SessionLibrary::createSession() { Mutex::Autolock lock(mSessionsLock); String8 sessionIdString = String8::format("%u", mNextSessionId); Loading @@ -57,9 +57,12 @@ const sp<Session>& SessionLibrary::createSession() { return mSessions.valueFor(sessionId); } const sp<Session>& SessionLibrary::findSession( sp<Session> SessionLibrary::findSession( const Vector<uint8_t>& sessionId) { Mutex::Autolock lock(mSessionsLock); if (mSessions.indexOfKey(sessionId) < 0) { return sp<Session>(NULL); } return mSessions.valueFor(sessionId); } Loading
drm/mediadrm/plugins/clearkey/SessionLibrary.h +3 −3 Original line number Diff line number Diff line Loading @@ -31,9 +31,9 @@ class SessionLibrary { public: static SessionLibrary* get(); const android::sp<Session>& createSession(); android::sp<Session> createSession(); const android::sp<Session>& findSession( android::sp<Session> findSession( const android::Vector<uint8_t>& sessionId); void destroySession(const android::sp<Session>& session); Loading @@ -48,7 +48,7 @@ private: android::Mutex mSessionsLock; uint32_t mNextSessionId; android::DefaultKeyedVector<android::Vector<uint8_t>, android::sp<Session> > android::KeyedVector<android::Vector<uint8_t>, android::sp<Session> > mSessions; }; Loading