diff options
author | Santosh Madhava <smadhava@google.com> | 2011-03-04 18:37:51 -0800 |
---|---|---|
committer | Santosh Madhava <smadhava@google.com> | 2011-03-04 18:37:51 -0800 |
commit | 895a28e14e6c88b4ff3b1f1cdf02d22f7b3b52ca (patch) | |
tree | a8bcc334f58fedb673efd660736fb14fb41ae29e /media/jni/mediaeditor | |
parent | 4d3e7fb7ab00c190aa7ce4f8a4d5174909067ccc (diff) | |
download | frameworks_base-895a28e14e6c88b4ff3b1f1cdf02d22f7b3b52ca.zip frameworks_base-895a28e14e6c88b4ff3b1f1cdf02d22f7b3b52ca.tar.gz frameworks_base-895a28e14e6c88b4ff3b1f1cdf02d22f7b3b52ca.tar.bz2 |
Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents
Change-Id: I376483c42b5bed8d2a1765804c2261c18d720a0c
Diffstat (limited to 'media/jni/mediaeditor')
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorOsal.cpp | 1 | ||||
-rwxr-xr-x | media/jni/mediaeditor/VideoEditorPropertiesMain.cpp | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/media/jni/mediaeditor/VideoEditorOsal.cpp b/media/jni/mediaeditor/VideoEditorOsal.cpp index 423e93f..035f59a 100755 --- a/media/jni/mediaeditor/VideoEditorOsal.cpp +++ b/media/jni/mediaeditor/VideoEditorOsal.cpp @@ -207,6 +207,7 @@ static const VideoEdit_Osal_Result gkRESULTS[] = VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_AUDIOBITRATE_TOO_HIGH ), VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_OUTPUT_FILE_SIZE_TOO_SMALL ), VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_NOMORE_SPACE ), + VIDEOEDIT_OSAL_RESULT_INIT(M4MCS_ERR_FILE_DRM_PROTECTED ), // M4READER_Common.h VIDEOEDIT_OSAL_RESULT_INIT(M4ERR_READER_UNKNOWN_STREAM_TYPE ), diff --git a/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp b/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp index 73a7c9c..3b795ce 100755 --- a/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp +++ b/media/jni/mediaeditor/VideoEditorPropertiesMain.cpp @@ -204,10 +204,17 @@ jobject videoEditProp_getProperties( result = getClipProperties( pEnv, thiz, pFile, clipType, pClipProperties); - // Check if the creation succeeded. - videoEditJava_checkAndThrowIllegalArgumentException( - &gotten, pEnv,(M4NO_ERROR != result), - "Invalid File or File not found"); + if (M4MCS_ERR_FILE_DRM_PROTECTED == result) { + // Check if the creation succeeded. + videoEditJava_checkAndThrowIllegalArgumentException( + &gotten, pEnv,(M4NO_ERROR != result), + "Invalid File - DRM Protected "); + } else { + // Check if the creation succeeded. + videoEditJava_checkAndThrowIllegalArgumentException( + &gotten, pEnv,(M4NO_ERROR != result), + "Invalid File or File not found "); + } /** * Max resolution supported is 1280 x 720. |