summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-23 22:58:07 -0800
committerChippa-a <vusal1372@gmail.com>2019-10-25 15:55:25 +0300
commit49dbc6fe0c752fede19c4213ca2fa463047608f8 (patch)
treeb003e68d5985c56d981b22c237221500b6cff0b9 /src/com
parent0fdf9a3f0f8ab0975388fad8a829b2aeaf01d695 (diff)
downloadandroid_packages_apps_Snap-49dbc6fe0c752fede19c4213ca2fa463047608f8.tar.gz
android_packages_apps_Snap-49dbc6fe0c752fede19c4213ca2fa463047608f8.tar.bz2
android_packages_apps_Snap-49dbc6fe0c752fede19c4213ca2fa463047608f8.zip
camera: Check if video sizes are available
* Some drivers don't report video sizes and we should avoid using fine resolution lookup, otherwise a crash results. * Just honor the defined camcorder profiles. Change-Id: I83e8fe2ca9bb489332f37767906bc7c56389f949
Diffstat (limited to 'src/com')
-rwxr-xr-xsrc/com/android/camera/CameraSettings.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index 00288ee16..d7654234a 100755
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -1403,6 +1403,10 @@ public class CameraSettings {
}
private static boolean checkSupportedVideoQuality(Parameters parameters,int width, int height){
List <Size> supported = parameters.getSupportedVideoSizes();
+ if (supported == null) {
+ // video-size not specified in parameter list. just go along with the profile.
+ return true;
+ }
int flag = 0;
for (Size size : supported){
//since we are having two profiles with same height, we are checking with height