summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <shade@chemlab.org>2013-12-23 22:58:07 -0800
committerMichael Bestas <mikeioannina@gmail.com>2015-09-17 23:26:01 +0300
commitf5abf2bebe9969b19a92d9d7cfca58cfbe3c34f4 (patch)
treec12dd44cfaa7266efe353a14bde279c48eb9b4bb
parent1e4e128c0d3c330cb241211f0722afedcb44a58f (diff)
downloadandroid_packages_apps_Snap-f5abf2bebe9969b19a92d9d7cfca58cfbe3c34f4.zip
android_packages_apps_Snap-f5abf2bebe9969b19a92d9d7cfca58cfbe3c34f4.tar.gz
android_packages_apps_Snap-f5abf2bebe9969b19a92d9d7cfca58cfbe3c34f4.tar.bz2
camera: Proper fix for the missing video-sizes issue
* Just honor the defined camcorder profiles. Change-Id: I83e8fe2ca9bb489332f37767906bc7c56389f949
-rw-r--r--src/com/android/camera/CameraSettings.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index f423a8d..1384912 100644
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -1128,6 +1128,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
@@ -1151,8 +1155,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));