summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/CameraSettings.java9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/com/android/camera/CameraSettings.java b/src/com/android/camera/CameraSettings.java
index f94c731..5b10d85 100755
--- a/src/com/android/camera/CameraSettings.java
+++ b/src/com/android/camera/CameraSettings.java
@@ -829,10 +829,11 @@ public class CameraSettings {
ArrayList<String> supported = new ArrayList<String>();
int zoomMaxIdx = params.getMaxZoom();
List <Integer> zoomRatios = params.getZoomRatios();
- int zoomMax = zoomRatios.get(zoomMaxIdx)/100;
-
- for (int zoomLevel = 0; zoomLevel <= zoomMax; zoomLevel++) {
- supported.add(String.valueOf(zoomLevel));
+ if (zoomRatios != null ) {
+ int zoomMax = zoomRatios.get(zoomMaxIdx)/100;
+ for (int zoomLevel = 0; zoomLevel <= zoomMax; zoomLevel++) {
+ supported.add(String.valueOf(zoomLevel));
+ }
}
return supported;
}