summaryrefslogtreecommitdiffstats
path: root/drm/jni/android_drm_DrmManagerClient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'drm/jni/android_drm_DrmManagerClient.cpp')
-rw-r--r--drm/jni/android_drm_DrmManagerClient.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/drm/jni/android_drm_DrmManagerClient.cpp b/drm/jni/android_drm_DrmManagerClient.cpp
index 80a8447..e34046f 100644
--- a/drm/jni/android_drm_DrmManagerClient.cpp
+++ b/drm/jni/android_drm_DrmManagerClient.cpp
@@ -77,7 +77,7 @@ String8 Utility::getStringValue(JNIEnv* env, jobject object, const char* fieldNa
env->ReleaseStringUTFChars(valueString, bytes);
delete [] data; data = NULL;
} else {
- LOGV("Failed to retrieve the data from the field %s", fieldName);
+ ALOGV("Failed to retrieve the data from the field %s", fieldName);
}
}
return dataString;
@@ -188,7 +188,7 @@ void JNIOnInfoListener::onInfo(const DrmInfoEvent& event) {
jint type = event.getType();
JNIEnv *env = AndroidRuntime::getJNIEnv();
jstring message = env->NewStringUTF(event.getMessage().string());
- LOGV("JNIOnInfoListener::onInfo => %d | %d | %s", uniqueId, type, event.getMessage().string());
+ ALOGV("JNIOnInfoListener::onInfo => %d | %d | %s", uniqueId, type, event.getMessage().string());
env->CallStaticVoidMethod(
mClass,
@@ -226,7 +226,7 @@ static sp<DrmManagerClientImpl> getDrmManagerClientImpl(JNIEnv* env, jobject thi
static jint android_drm_DrmManagerClient_initialize(
JNIEnv* env, jobject thiz, jobject weak_thiz) {
- LOGV("initialize - Enter");
+ ALOGV("initialize - Enter");
int uniqueId = 0;
sp<DrmManagerClientImpl> drmManager = DrmManagerClientImpl::create(&uniqueId, false);
@@ -237,13 +237,13 @@ static jint android_drm_DrmManagerClient_initialize(
drmManager->setOnInfoListener(uniqueId, listener);
setDrmManagerClientImpl(env, thiz, drmManager);
- LOGV("initialize - Exit");
+ ALOGV("initialize - Exit");
return uniqueId;
}
static void android_drm_DrmManagerClient_finalize(JNIEnv* env, jobject thiz, jint uniqueId) {
- LOGV("finalize - Enter");
+ ALOGV("finalize - Enter");
DrmManagerClientImpl::remove(uniqueId);
getDrmManagerClientImpl(env, thiz)->setOnInfoListener(uniqueId, NULL);
@@ -252,12 +252,12 @@ static void android_drm_DrmManagerClient_finalize(JNIEnv* env, jobject thiz, jin
oldClient->setOnInfoListener(uniqueId, NULL);
oldClient->removeClient(uniqueId);
}
- LOGV("finalize - Exit");
+ ALOGV("finalize - Exit");
}
static jobject android_drm_DrmManagerClient_getConstraintsFromContent(
JNIEnv* env, jobject thiz, jint uniqueId, jstring jpath, jint usage) {
- LOGV("GetConstraints - Enter");
+ ALOGV("GetConstraints - Enter");
const String8 pathString = Utility::getStringValue(env, jpath);
DrmConstraints* pConstraints
@@ -298,13 +298,13 @@ static jobject android_drm_DrmManagerClient_getConstraintsFromContent(
}
delete pConstraints; pConstraints = NULL;
- LOGV("GetConstraints - Exit");
+ ALOGV("GetConstraints - Exit");
return constraints;
}
static jobject android_drm_DrmManagerClient_getMetadataFromContent(
JNIEnv* env, jobject thiz, jint uniqueId, jstring jpath) {
- LOGV("GetMetadata - Enter");
+ ALOGV("GetMetadata - Enter");
const String8 pathString = Utility::getStringValue(env, jpath);
DrmMetadata* pMetadata =
getDrmManagerClientImpl(env, thiz)->getMetadata(uniqueId, &pathString);
@@ -335,13 +335,13 @@ static jobject android_drm_DrmManagerClient_getMetadataFromContent(
}
}
delete pMetadata; pMetadata = NULL;
- LOGV("GetMetadata - Exit");
+ ALOGV("GetMetadata - Exit");
return metadata;
}
static jobjectArray android_drm_DrmManagerClient_getAllSupportInfo(
JNIEnv* env, jobject thiz, jint uniqueId) {
- LOGV("GetAllSupportInfo - Enter");
+ ALOGV("GetAllSupportInfo - Enter");
DrmSupportInfo* drmSupportInfoArray = NULL;
int length = 0;
@@ -382,22 +382,22 @@ static jobjectArray android_drm_DrmManagerClient_getAllSupportInfo(
}
delete [] drmSupportInfoArray; drmSupportInfoArray = NULL;
- LOGV("GetAllSupportInfo - Exit");
+ ALOGV("GetAllSupportInfo - Exit");
return array;
}
static void android_drm_DrmManagerClient_installDrmEngine(
JNIEnv* env, jobject thiz, jint uniqueId, jstring engineFilePath) {
- LOGV("installDrmEngine - Enter");
+ ALOGV("installDrmEngine - Enter");
//getDrmManagerClient(env, thiz)
// ->installDrmEngine(uniqueId, Utility::getStringValue(env, engineFilePath));
- LOGV("installDrmEngine - Exit");
+ ALOGV("installDrmEngine - Exit");
}
static jint android_drm_DrmManagerClient_saveRights(
JNIEnv* env, jobject thiz, jint uniqueId,
jobject drmRights, jstring rightsPath, jstring contentPath) {
- LOGV("saveRights - Enter");
+ ALOGV("saveRights - Enter");
int result = DRM_ERROR_UNKNOWN;
int dataLength = 0;
char* mData = Utility::getByteArrayValue(env, drmRights, "mData", &dataLength);
@@ -413,24 +413,24 @@ static jint android_drm_DrmManagerClient_saveRights(
}
delete mData; mData = NULL;
- LOGV("saveRights - Exit");
+ ALOGV("saveRights - Exit");
return result;
}
static jboolean android_drm_DrmManagerClient_canHandle(
JNIEnv* env, jobject thiz, jint uniqueId, jstring path, jstring mimeType) {
- LOGV("canHandle - Enter");
+ ALOGV("canHandle - Enter");
jboolean result
= getDrmManagerClientImpl(env, thiz)
->canHandle(uniqueId, Utility::getStringValue(env, path),
Utility::getStringValue(env, mimeType));
- LOGV("canHandle - Exit");
+ ALOGV("canHandle - Exit");
return result;
}
static jobject android_drm_DrmManagerClient_processDrmInfo(
JNIEnv* env, jobject thiz, jint uniqueId, jobject drmInfoObject) {
- LOGV("processDrmInfo - Enter");
+ ALOGV("processDrmInfo - Enter");
int dataLength = 0;
const String8 mMimeType = Utility::getStringValue(env, drmInfoObject, "mMimeType");
char* mData = Utility::getByteArrayValue(env, drmInfoObject, "mData", &dataLength);
@@ -463,7 +463,7 @@ static jobject android_drm_DrmManagerClient_processDrmInfo(
String8 keyString = Utility::getStringValue(env, key);
String8 valueString = Utility::getStringValue(env, valString);
- LOGV("Key: %s | Value: %s", keyString.string(), valueString.string());
+ ALOGV("Key: %s | Value: %s", keyString.string(), valueString.string());
drmInfo.put(keyString, valueString);
}
@@ -506,13 +506,13 @@ static jobject android_drm_DrmManagerClient_processDrmInfo(
delete mData; mData = NULL;
delete pDrmInfoStatus; pDrmInfoStatus = NULL;
- LOGV("processDrmInfo - Exit");
+ ALOGV("processDrmInfo - Exit");
return drmInfoStatus;
}
static jobject android_drm_DrmManagerClient_acquireDrmInfo(
JNIEnv* env, jobject thiz, jint uniqueId, jobject drmInfoRequest) {
- LOGV("acquireDrmInfo Enter");
+ ALOGV("acquireDrmInfo Enter");
const String8 mMimeType = Utility::getStringValue(env, drmInfoRequest, "mMimeType");
int mInfoType = Utility::getIntValue(env, drmInfoRequest, "mInfoType");
@@ -536,7 +536,7 @@ static jobject android_drm_DrmManagerClient_acquireDrmInfo(
String8 keyString = Utility::getStringValue(env, key);
String8 valueString = Utility::getStringValue(env, value);
- LOGV("Key: %s | Value: %s", keyString.string(), valueString.string());
+ ALOGV("Key: %s | Value: %s", keyString.string(), valueString.string());
drmInfoReq.put(keyString, valueString);
}
@@ -576,67 +576,67 @@ static jobject android_drm_DrmManagerClient_acquireDrmInfo(
delete pDrmInfo; pDrmInfo = NULL;
- LOGV("acquireDrmInfo Exit");
+ ALOGV("acquireDrmInfo Exit");
return drmInfoObject;
}
static jint android_drm_DrmManagerClient_getDrmObjectType(
JNIEnv* env, jobject thiz, jint uniqueId, jstring path, jstring mimeType) {
- LOGV("getDrmObjectType Enter");
+ ALOGV("getDrmObjectType Enter");
int drmObjectType
= getDrmManagerClientImpl(env, thiz)
->getDrmObjectType(uniqueId, Utility::getStringValue(env, path),
Utility::getStringValue(env, mimeType));
- LOGV("getDrmObjectType Exit");
+ ALOGV("getDrmObjectType Exit");
return drmObjectType;
}
static jstring android_drm_DrmManagerClient_getOriginalMimeType(
JNIEnv* env, jobject thiz, jint uniqueId, jstring path) {
- LOGV("getOriginalMimeType Enter");
+ ALOGV("getOriginalMimeType Enter");
String8 mimeType
= getDrmManagerClientImpl(env, thiz)
->getOriginalMimeType(uniqueId, Utility::getStringValue(env, path));
- LOGV("getOriginalMimeType Exit");
+ ALOGV("getOriginalMimeType Exit");
return env->NewStringUTF(mimeType.string());
}
static jint android_drm_DrmManagerClient_checkRightsStatus(
JNIEnv* env, jobject thiz, jint uniqueId, jstring path, int action) {
- LOGV("getOriginalMimeType Enter");
+ ALOGV("getOriginalMimeType Enter");
int rightsStatus
= getDrmManagerClientImpl(env, thiz)
->checkRightsStatus(uniqueId, Utility::getStringValue(env, path), action);
- LOGV("getOriginalMimeType Exit");
+ ALOGV("getOriginalMimeType Exit");
return rightsStatus;
}
static jint android_drm_DrmManagerClient_removeRights(
JNIEnv* env, jobject thiz, jint uniqueId, jstring path) {
- LOGV("removeRights");
+ ALOGV("removeRights");
return getDrmManagerClientImpl(env, thiz)
->removeRights(uniqueId, Utility::getStringValue(env, path));
}
static jint android_drm_DrmManagerClient_removeAllRights(
JNIEnv* env, jobject thiz, jint uniqueId) {
- LOGV("removeAllRights");
+ ALOGV("removeAllRights");
return getDrmManagerClientImpl(env, thiz)->removeAllRights(uniqueId);
}
static jint android_drm_DrmManagerClient_openConvertSession(
JNIEnv* env, jobject thiz, jint uniqueId, jstring mimeType) {
- LOGV("openConvertSession Enter");
+ ALOGV("openConvertSession Enter");
int convertId
= getDrmManagerClientImpl(env, thiz)
->openConvertSession(uniqueId, Utility::getStringValue(env, mimeType));
- LOGV("openConvertSession Exit");
+ ALOGV("openConvertSession Exit");
return convertId;
}
static jobject android_drm_DrmManagerClient_convertData(
JNIEnv* env, jobject thiz, jint uniqueId, jint convertId, jbyteArray inputData) {
- LOGV("convertData Enter");
+ ALOGV("convertData Enter");
int dataLength = 0;
char* mData = Utility::getByteArrayValue(env, inputData, &dataLength);
@@ -671,14 +671,14 @@ static jobject android_drm_DrmManagerClient_convertData(
delete mData; mData = NULL;
delete pDrmConvertedStatus; pDrmConvertedStatus = NULL;
- LOGV("convertData - Exit");
+ ALOGV("convertData - Exit");
return drmConvertedStatus;
}
static jobject android_drm_DrmManagerClient_closeConvertSession(
JNIEnv* env, jobject thiz, int uniqueId, jint convertId) {
- LOGV("closeConvertSession Enter");
+ ALOGV("closeConvertSession Enter");
DrmConvertedStatus* pDrmConvertedStatus
= getDrmManagerClientImpl(env, thiz)->closeConvertSession(uniqueId, convertId);
@@ -708,7 +708,7 @@ static jobject android_drm_DrmManagerClient_closeConvertSession(
delete pDrmConvertedStatus; pDrmConvertedStatus = NULL;
- LOGV("closeConvertSession - Exit");
+ ALOGV("closeConvertSession - Exit");
return drmConvertedStatus;
}