Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e8dc72d authored by Santosh Madhava's avatar Santosh Madhava Committed by Android (Google) Code Review
Browse files

Merge "Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected...

Merge "Fix for issue 3453519: (Java/JNI) do not allow editing of DRM protected contents" into honeycomb-mr1
parents ff23352e 895a28e1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ public class AudioTrack {
        try {
          properties = mMANativeHelper.getMediaProperties(filename);
        } catch (Exception e) {
            throw new IllegalArgumentException("Unsupported file or file not found");
            throw new IllegalArgumentException(e.getMessage() + " : " + filename);
        }
        switch (mMANativeHelper.getFileType(properties.fileType)) {
            case MediaProperties.FILE_3GP:
+1 −1
Original line number Diff line number Diff line
@@ -115,7 +115,7 @@ public class MediaVideoItem extends MediaItem {
        try {
             properties = mMANativeHelper.getMediaProperties(filename);
        } catch ( Exception e) {
            throw new IllegalArgumentException("Unsupported file or file not found: " + filename);
            throw new IllegalArgumentException(e.getMessage() + " : " + filename);
        }

        switch (mMANativeHelper.getFileType(properties.fileType)) {
+1 −0
Original line number Diff line number Diff line
@@ -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                       ),
+11 −4
Original line number Diff line number Diff line
@@ -204,10 +204,17 @@ jobject videoEditProp_getProperties(
                result = getClipProperties(
                        pEnv, thiz, pFile, clipType, pClipProperties);

                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.