Remove obsolete drm manager code
bug: 9545965 Change-Id: Ia6e09efa826b1349d027045e782980daeb7d7596
This commit is contained in:
@@ -153,18 +153,6 @@ status_t BpDrmManagerService::setDrmServiceListener(
|
|||||||
return reply.readInt32();
|
return reply.readInt32();
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t BpDrmManagerService::installDrmEngine(int uniqueId, const String8& drmEngineFile) {
|
|
||||||
ALOGV("Install DRM Engine");
|
|
||||||
Parcel data, reply;
|
|
||||||
|
|
||||||
data.writeInterfaceToken(IDrmManagerService::getInterfaceDescriptor());
|
|
||||||
data.writeInt32(uniqueId);
|
|
||||||
data.writeString8(drmEngineFile);
|
|
||||||
|
|
||||||
remote()->transact(INSTALL_DRM_ENGINE, data, &reply);
|
|
||||||
return reply.readInt32();
|
|
||||||
}
|
|
||||||
|
|
||||||
DrmConstraints* BpDrmManagerService::getConstraints(
|
DrmConstraints* BpDrmManagerService::getConstraints(
|
||||||
int uniqueId, const String8* path, const int action) {
|
int uniqueId, const String8* path, const int action) {
|
||||||
ALOGV("Get Constraints");
|
ALOGV("Get Constraints");
|
||||||
@@ -855,19 +843,6 @@ status_t BnDrmManagerService::onTransact(
|
|||||||
return DRM_NO_ERROR;
|
return DRM_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
case INSTALL_DRM_ENGINE:
|
|
||||||
{
|
|
||||||
ALOGV("BnDrmManagerService::onTransact :INSTALL_DRM_ENGINE");
|
|
||||||
CHECK_INTERFACE(IDrmManagerService, data, reply);
|
|
||||||
|
|
||||||
const int uniqueId = data.readInt32();
|
|
||||||
const String8 engineFile = data.readString8();
|
|
||||||
status_t status = installDrmEngine(uniqueId, engineFile);
|
|
||||||
|
|
||||||
reply->writeInt32(status);
|
|
||||||
return DRM_NO_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
case GET_CONSTRAINTS_FROM_CONTENT:
|
case GET_CONSTRAINTS_FROM_CONTENT:
|
||||||
{
|
{
|
||||||
ALOGV("BnDrmManagerService::onTransact :GET_CONSTRAINTS_FROM_CONTENT");
|
ALOGV("BnDrmManagerService::onTransact :GET_CONSTRAINTS_FROM_CONTENT");
|
||||||
|
|||||||
@@ -175,21 +175,6 @@ DrmMetadata* DrmManager::getMetadata(int uniqueId, const String8* path) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t DrmManager::installDrmEngine(int uniqueId, const String8& absolutePath) {
|
|
||||||
Mutex::Autolock _l(mLock);
|
|
||||||
mPlugInManager.loadPlugIn(absolutePath);
|
|
||||||
|
|
||||||
IDrmEngine& rDrmEngine = mPlugInManager.getPlugIn(absolutePath);
|
|
||||||
rDrmEngine.initialize(uniqueId);
|
|
||||||
rDrmEngine.setOnInfoListener(uniqueId, this);
|
|
||||||
|
|
||||||
DrmSupportInfo* info = rDrmEngine.getSupportInfo(0);
|
|
||||||
mSupportInfoToPlugInIdMap.add(*info, absolutePath);
|
|
||||||
delete info;
|
|
||||||
|
|
||||||
return DRM_NO_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DrmManager::canHandle(int uniqueId, const String8& path, const String8& mimeType) {
|
bool DrmManager::canHandle(int uniqueId, const String8& path, const String8& mimeType) {
|
||||||
Mutex::Autolock _l(mLock);
|
Mutex::Autolock _l(mLock);
|
||||||
const String8 plugInId = getSupportedPlugInId(mimeType);
|
const String8 plugInId = getSupportedPlugInId(mimeType);
|
||||||
|
|||||||
@@ -87,11 +87,6 @@ status_t DrmManagerService::setDrmServiceListener(
|
|||||||
return DRM_NO_ERROR;
|
return DRM_NO_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t DrmManagerService::installDrmEngine(int uniqueId, const String8& drmEngineFile) {
|
|
||||||
ALOGV("Entering installDrmEngine");
|
|
||||||
return mDrmManager->installDrmEngine(uniqueId, drmEngineFile);
|
|
||||||
}
|
|
||||||
|
|
||||||
DrmConstraints* DrmManagerService::getConstraints(
|
DrmConstraints* DrmManagerService::getConstraints(
|
||||||
int uniqueId, const String8* path, const int action) {
|
int uniqueId, const String8* path, const int action) {
|
||||||
ALOGV("Entering getConstraints from content");
|
ALOGV("Entering getConstraints from content");
|
||||||
|
|||||||
@@ -86,15 +86,6 @@ status_t DrmManagerClientImpl::setOnInfoListener(
|
|||||||
(NULL != infoListener.get()) ? this : NULL);
|
(NULL != infoListener.get()) ? this : NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
status_t DrmManagerClientImpl::installDrmEngine(
|
|
||||||
int uniqueId, const String8& drmEngineFile) {
|
|
||||||
status_t status = DRM_ERROR_UNKNOWN;
|
|
||||||
if (EMPTY_STRING != drmEngineFile) {
|
|
||||||
status = getDrmManagerService()->installDrmEngine(uniqueId, drmEngineFile);
|
|
||||||
}
|
|
||||||
return status;
|
|
||||||
}
|
|
||||||
|
|
||||||
DrmConstraints* DrmManagerClientImpl::getConstraints(
|
DrmConstraints* DrmManagerClientImpl::getConstraints(
|
||||||
int uniqueId, const String8* path, const int action) {
|
int uniqueId, const String8* path, const int action) {
|
||||||
DrmConstraints *drmConstraints = NULL;
|
DrmConstraints *drmConstraints = NULL;
|
||||||
|
|||||||
@@ -70,8 +70,6 @@ public:
|
|||||||
status_t setDrmServiceListener(
|
status_t setDrmServiceListener(
|
||||||
int uniqueId, const sp<IDrmServiceListener>& drmServiceListener);
|
int uniqueId, const sp<IDrmServiceListener>& drmServiceListener);
|
||||||
|
|
||||||
status_t installDrmEngine(int uniqueId, const String8& drmEngineFile);
|
|
||||||
|
|
||||||
DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
|
DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
|
||||||
|
|
||||||
DrmMetadata* getMetadata(int uniqueId, const String8* path);
|
DrmMetadata* getMetadata(int uniqueId, const String8* path);
|
||||||
|
|||||||
@@ -409,17 +409,6 @@ public:
|
|||||||
*/
|
*/
|
||||||
status_t notify(const DrmInfoEvent& event);
|
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:
|
private:
|
||||||
Mutex mLock;
|
Mutex mLock;
|
||||||
sp<DrmManagerClient::OnInfoListener> mOnInfoListener;
|
sp<DrmManagerClient::OnInfoListener> mOnInfoListener;
|
||||||
|
|||||||
@@ -57,8 +57,6 @@ public:
|
|||||||
status_t setDrmServiceListener(
|
status_t setDrmServiceListener(
|
||||||
int uniqueId, const sp<IDrmServiceListener>& drmServiceListener);
|
int uniqueId, const sp<IDrmServiceListener>& drmServiceListener);
|
||||||
|
|
||||||
status_t installDrmEngine(int uniqueId, const String8& drmEngineFile);
|
|
||||||
|
|
||||||
DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
|
DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
|
||||||
|
|
||||||
DrmMetadata* getMetadata(int uniqueId, const String8* path);
|
DrmMetadata* getMetadata(int uniqueId, const String8* path);
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ public:
|
|||||||
virtual status_t setDrmServiceListener(
|
virtual status_t setDrmServiceListener(
|
||||||
int uniqueId, const sp<IDrmServiceListener>& infoListener) = 0;
|
int uniqueId, const sp<IDrmServiceListener>& infoListener) = 0;
|
||||||
|
|
||||||
virtual status_t installDrmEngine(int uniqueId, const String8& drmEngineFile) = 0;
|
|
||||||
|
|
||||||
virtual DrmConstraints* getConstraints(
|
virtual DrmConstraints* getConstraints(
|
||||||
int uniqueId, const String8* path, const int action) = 0;
|
int uniqueId, const String8* path, const int action) = 0;
|
||||||
|
|
||||||
@@ -185,8 +183,6 @@ public:
|
|||||||
virtual status_t setDrmServiceListener(
|
virtual status_t setDrmServiceListener(
|
||||||
int uniqueId, const sp<IDrmServiceListener>& infoListener);
|
int uniqueId, const sp<IDrmServiceListener>& infoListener);
|
||||||
|
|
||||||
virtual status_t installDrmEngine(int uniqueId, const String8& drmEngineFile);
|
|
||||||
|
|
||||||
virtual DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
|
virtual DrmConstraints* getConstraints(int uniqueId, const String8* path, const int action);
|
||||||
|
|
||||||
virtual DrmMetadata* getMetadata(int uniqueId, const String8* path);
|
virtual DrmMetadata* getMetadata(int uniqueId, const String8* path);
|
||||||
|
|||||||
Reference in New Issue
Block a user