diff options
author | Steve Kondik <shade@chemlab.org> | 2013-12-23 22:58:07 -0800 |
---|---|---|
committer | Michael Bestas <mikeioannina@gmail.com> | 2017-01-04 21:57:36 +0200 |
commit | fe30bb56de08e375e3856fae544eb98664b7ce32 (patch) | |
tree | 0d497057d9087bc671b972cf048c0b117969e430 /src | |
parent | a5f0e1c0411f9d579da397bcd85d6ff73b5a71eb (diff) | |
download | android_packages_apps_Snap-fe30bb56de08e375e3856fae544eb98664b7ce32.tar.gz android_packages_apps_Snap-fe30bb56de08e375e3856fae544eb98664b7ce32.tar.bz2 android_packages_apps_Snap-fe30bb56de08e375e3856fae544eb98664b7ce32.zip |
camera: Proper fix for the missing video-sizes issue
* Just honor the defined camcorder profiles.
Change-Id: I83e8fe2ca9bb489332f37767906bc7c56389f949
Diffstat (limited to 'src')
-rw-r--r-- | src/com/android/camera/CameraSettings.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java index d427c864b..d60939583 100644 --- a/src/com/android/camera/CameraSettings.java +++ b/src/com/android/camera/CameraSettings.java @@ -1245,6 +1245,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 @@ -1268,8 +1272,7 @@ 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 && - parameters.getSupportedVideoSizes() != null) { + if (ApiHelper.HAS_FINE_RESOLUTION_QUALITY_LEVELS) { getFineResolutionQuality(supported,cameraId,parameters); } else { supported.add(Integer.toString(CamcorderProfile.QUALITY_HIGH)); |