From fee968da454bad68dc3ea4b63a0402b46a75d32d Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Thu, 2 Jun 2022 15:01:04 -0700 Subject: [PATCH] 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 --- media/java/android/media/CamcorderProfile.java | 2 +- media/jni/android_media_MediaProfiles.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/media/java/android/media/CamcorderProfile.java b/media/java/android/media/CamcorderProfile.java index 3dbb8e0986f0c..2643b0115d015 100644 --- a/media/java/android/media/CamcorderProfile.java +++ b/media/java/android/media/CamcorderProfile.java @@ -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. *

* Quality levels QUALITY_LOW, QUALITY_HIGH are guaranteed to be supported, while diff --git a/media/jni/android_media_MediaProfiles.cpp b/media/jni/android_media_MediaProfiles.cpp index f2c48a04935fd..ecb1d510f807f 100644 --- a/media/jni/android_media_MediaProfiles.cpp +++ b/media/jni/android_media_MediaProfiles.cpp @@ -236,8 +236,6 @@ android_media_MediaProfiles_native_get_camcorder_profiles(JNIEnv *env, jobject / camcorder_quality q = static_cast(quality); const MediaProfiles::CamcorderProfile *cp = sProfiles->getCamcorderProfile(id, q); if (!cp) { - jniThrowException(env, "java/lang/RuntimeException", - "Error retrieving camcorder profile params"); return NULL; }