Add support to query through DrmInfoRequest::TYPE_REGISTRATION_INFO to check if a device is provisioned.
Includes Widevine lib version: 4.5.0.5781 AES BR_PYTHON2 Change-Id: Id5e673b97e3ec80532e2d7f42aae687adfecc765 related-to-bug: 5152997
This commit is contained in:
@@ -28,6 +28,12 @@ class WVDRMPluginAPI {
|
||||
PLAYBACK_INVALID
|
||||
};
|
||||
|
||||
// provisionedFlags
|
||||
enum {
|
||||
DEVICE_IS_PROVISIONED,
|
||||
DEVICE_IS_NOT_PROVISIONED
|
||||
};
|
||||
|
||||
static const int PlaybackMode_Default = 0;
|
||||
static const int PlaybackMode_Streaming = 1;
|
||||
static const int PlaybackMode_Offline = 2;
|
||||
@@ -42,6 +48,7 @@ class WVDRMPluginAPI {
|
||||
virtual bool IsSupportedMediaType(const char *uri) = 0;
|
||||
|
||||
virtual bool RegisterDrmInfo(std::string &portal, std::string &dsPath) = 0;
|
||||
virtual bool RegisterDrmInfo(std::string &portal, std::string &dsPath, uint32_t *status) = 0;
|
||||
virtual bool UnregisterDrmInfo(std::string &portal, std::string &dsPath) = 0;
|
||||
virtual bool AcquireDrmInfo(std::string &assetPath, WVCredentials &credentials,
|
||||
std::string &dsPath, const std::string &systemIdStr,
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -296,6 +296,7 @@ DrmInfo* WVMDrmPlugin::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmI
|
||||
// creates a data store object per each portal
|
||||
std::string assetDbPath = drmInfoRequest->get(String8("WVAssetDBPathKey")).string();
|
||||
std::string portal = drmInfoRequest->get(String8("WVPortalKey")).string();
|
||||
uint32_t drmInfoRequestStatus = 0;
|
||||
|
||||
if (portal.size() == 0) {
|
||||
ALOGE("onAcquireDrmInfo: Must specify portal string for registration operations");
|
||||
@@ -303,7 +304,7 @@ DrmInfo* WVMDrmPlugin::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmI
|
||||
}
|
||||
|
||||
if (drmInfoRequest->getInfoType()==DrmInfoRequest::TYPE_REGISTRATION_INFO) {
|
||||
if (!mDrmPluginImpl->RegisterDrmInfo(portal, assetDbPath)) {
|
||||
if (!mDrmPluginImpl->RegisterDrmInfo(portal, assetDbPath, &drmInfoRequestStatus)) {
|
||||
ALOGE("onAcquireDrmInfo: RegisterDrmInfo failed");
|
||||
return NULL;
|
||||
}
|
||||
@@ -321,6 +322,12 @@ DrmInfo* WVMDrmPlugin::onAcquireDrmInfo(int uniqueId, const DrmInfoRequest* drmI
|
||||
memcpy(data, dataString.string(), length);
|
||||
drmInfo = new DrmInfo(drmInfoRequest->getInfoType(),
|
||||
DrmBuffer(data, length), drmInfoRequest->getMimeType());
|
||||
|
||||
if (drmInfoRequest->getInfoType()==DrmInfoRequest::TYPE_REGISTRATION_INFO) {
|
||||
char buffer[16];
|
||||
sprintf(buffer, "%lu", (unsigned long)drmInfoRequestStatus);
|
||||
drmInfo->put(String8("WVDrmInfoRequestStatusKey"), String8(buffer));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case DrmInfoRequest::TYPE_RIGHTS_ACQUISITION_PROGRESS_INFO: {
|
||||
|
||||
Reference in New Issue
Block a user