summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java
index 11017f717..5cc20e03f 100755
--- a/src/com/android/camera/CaptureModule.java
+++ b/src/com/android/camera/CaptureModule.java
@@ -744,7 +744,12 @@ public class CaptureModule implements CameraModule, PhotoController,
private void detectHDRMode(CaptureResult result, int id) {
String value = mSettingsManager.getValue(SettingsManager.KEY_SCENE_MODE);
String autoHdr = mSettingsManager.getValue(SettingsManager.KEY_AUTO_HDR);
- Byte hdrScene = result.get(CaptureModule.isHdr);
+ Byte hdrScene = null;
+ try {
+ hdrScene = result.get(CaptureModule.isHdr);
+ } catch (IllegalArgumentException e) {
+ // Ignore exception.
+ }
if (value == null || hdrScene == null) return;
mAutoHdrEnable = false;
if (autoHdr != null && "enable".equals(autoHdr) && "0".equals(value) && hdrScene == 1) {
@@ -841,7 +846,12 @@ public class CaptureModule implements CameraModule, PhotoController,
private void updateStatsView(String stats_visualizer,CaptureResult result) {
int r, g, b, index;
if (stats_visualizer.contains("2")) {
- int[] histogramStats = result.get(CaptureModule.histogramStats);
+ int[] histogramStats = null;
+ try {
+ histogramStats = result.get(CaptureModule.histogramStats);
+ } catch (IllegalArgumentException e) {
+ // Ignore exception.
+ }
if (histogramStats != null && mHiston) {
/*The first element in the array stores max hist value . Stats data begin
from second value*/
@@ -5991,6 +6001,8 @@ public class CaptureModule implements CameraModule, PhotoController,
}
private void applyExposureMeteringModes(CaptureRequest.Builder request) {
+ if (!VendorTagUtil.isSupported(request, CaptureModule.exposure_metering))
+ return;
String value = mSettingsManager.getValue(SettingsManager.KEY_EXPOSURE_METERING_MODE);
if (value != null) {
int intValue = Integer.parseInt(value);