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

Commit fee968da authored by Lajos Molnar's avatar Lajos Molnar
Browse files

media: return null when there are no CamcorderProfiles for getAll

The API says that null is returned, but an exception was thrown.

Also correct a misleading word in the getAll description.

Bug: 232286218
Change-Id: Iee336628753fad29bb5fccff211e4997fb51a99b
parent b4a4c3b3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -537,7 +537,7 @@ public class CamcorderProfile
    public static final long RETURN_ADVANCED_VIDEO_PROFILES = 206033068L; // buganizer id
    public static final long RETURN_ADVANCED_VIDEO_PROFILES = 206033068L; // buganizer id


    /**
    /**
     * Returns all basic encoder profiles of a camcorder profile for
     * Returns all encoder profiles of a camcorder profile for
     * the given camera at the given quality level.
     * the given camera at the given quality level.
     * <p>
     * <p>
     * Quality levels QUALITY_LOW, QUALITY_HIGH are guaranteed to be supported, while
     * Quality levels QUALITY_LOW, QUALITY_HIGH are guaranteed to be supported, while
+0 −2
Original line number Original line Diff line number Diff line
@@ -236,8 +236,6 @@ android_media_MediaProfiles_native_get_camcorder_profiles(JNIEnv *env, jobject /
    camcorder_quality q = static_cast<camcorder_quality>(quality);
    camcorder_quality q = static_cast<camcorder_quality>(quality);
    const MediaProfiles::CamcorderProfile *cp = sProfiles->getCamcorderProfile(id, q);
    const MediaProfiles::CamcorderProfile *cp = sProfiles->getCamcorderProfile(id, q);
    if (!cp) {
    if (!cp) {
        jniThrowException(env, "java/lang/RuntimeException",
                          "Error retrieving camcorder profile params");
        return NULL;
        return NULL;
    }
    }