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
This commit is contained in:
Lajos Molnar
2022-06-02 15:01:04 -07:00
parent b4a4c3b3a0
commit fee968da45
2 changed files with 1 additions and 3 deletions

View File

@@ -537,7 +537,7 @@ public class CamcorderProfile
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.
* <p>
* Quality levels QUALITY_LOW, QUALITY_HIGH are guaranteed to be supported, while

View File

@@ -236,8 +236,6 @@ android_media_MediaProfiles_native_get_camcorder_profiles(JNIEnv *env, jobject /
camcorder_quality q = static_cast<camcorder_quality>(quality);
const MediaProfiles::CamcorderProfile *cp = sProfiles->getCamcorderProfile(id, q);
if (!cp) {
jniThrowException(env, "java/lang/RuntimeException",
"Error retrieving camcorder profile params");
return NULL;
}