summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChirayu Desai <cdesai@cyanogenmod.org>2013-10-18 18:48:37 +0530
committerSteve Kondik <shade@chemlab.org>2013-10-18 15:54:50 -0700
commit45591145cddf5bc0f9d9026509335cd60540776c (patch)
tree010d0930a2bfd0d2a30b88c9c4af1d258362b556
parent505a85fa8e8a4b9c8b4fdf851dcfc14349f9ba3d (diff)
downloadandroid_packages_apps_Gallery2-45591145cddf5bc0f9d9026509335cd60540776c.tar.gz
android_packages_apps_Gallery2-45591145cddf5bc0f9d9026509335cd60540776c.tar.bz2
android_packages_apps_Gallery2-45591145cddf5bc0f9d9026509335cd60540776c.zip
camera: VideoModule: fix NPE while trying to set HFR video parameter
* getSupportedVideoHighFrameRateModes can return null on a device which doesn't support it, so check if it's not null rather than checking if it's size is > 0. Change-Id: Ie5be1f8a0f885ea913be5fb1eb44a97e648756d6
-rw-r--r--src/com/android/camera/VideoModule.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 59ec3a145..6e55cd977 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -2099,7 +2099,7 @@ public class VideoModule implements CameraModule,
// Enable HFR mode for WVGA
List<String> hfrModes = mParameters.getSupportedVideoHighFrameRateModes();
- if (hfrModes.size() > 0) {
+ if (hfrModes != null) {
mParameters.setVideoHighFrameRate(mEnableHFR ? hfrModes.get(hfrModes.size() - 1) : "off");
}