summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-23 13:33:21 -0800
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:01 +0300
commit1e4e128c0d3c330cb241211f0722afedcb44a58f (patch)
treedc034b18fb864d71645e03a7585b1b1bca4e535e
parent2398dff837f0744b03194a1016dc4457efac341e (diff)
downloadandroid_packages_apps_Snap-1e4e128c0d3c330cb241211f0722afedcb44a58f.zip
android_packages_apps_Snap-1e4e128c0d3c330cb241211f0722afedcb44a58f.tar.gz
android_packages_apps_Snap-1e4e128c0d3c330cb241211f0722afedcb44a58f.tar.bz2
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. Change-Id: I8010e66d1a3a5e6f8a505ff3b50146cd24fc2b9c
-rw-r--r--src/com/android/camera/CameraSettings.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index db3bf27..f423a8d 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -1151,8 +1151,9 @@ public class CameraSettings {
private static ArrayList<String> getSupportedVideoQuality(int cameraId,Parameters parameters) {
ArrayList<String> supported = new ArrayList<String>();
// Check for supported quality
- if (ApiHelper.HAS_FINE_RESOLUTION_QUALITY_LEVELS) {
- getFineResolutionQuality(supported,cameraId,parameters);
+ if (ApiHelper.HAS_FINE_RESOLUTION_QUALITY_LEVELS &&
+ parameters.getSupportedVideoSizes() != null) {
+ getFineResolutionQuality(supported,cameraId,parameters);
} else {
supported.add(Integer.toString(CamcorderProfile.QUALITY_HIGH));
CamcorderProfile high = CamcorderProfile.get(