From 27315e9458ab47c338b4008cb012aa3d6472ad04 Mon Sep 17 00:00:00 2001 From: junjiez Date: Thu, 19 Jan 2017 14:22:29 +0800 Subject: SnapdragonCamera: enable histogram for front camera enable histogram for front camera, allow both cameras to set histogram key. Change-Id: I23cbcec81dd1c3149ee361e2d726683b6ecc5394 CRs-Fixed: 1109689 --- src/com/android/camera/CaptureModule.java | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/com/android/camera/CaptureModule.java') diff --git a/src/com/android/camera/CaptureModule.java b/src/com/android/camera/CaptureModule.java index b06bd2d12..ab0854eea 100755 --- a/src/com/android/camera/CaptureModule.java +++ b/src/com/android/camera/CaptureModule.java @@ -556,17 +556,16 @@ public class CaptureModule implements CameraModule, PhotoController, updateFocusStateChange(result); Face[] faces = result.get(CaptureResult.STATISTICS_FACES); updateFaceView(faces); - - if (SettingsManager.getInstance().isHistogramSupport()) { - int[] histogramStats = result.get(CaptureModule.histogramStats); - if (histogramStats != null && mHiston) { + } + if (SettingsManager.getInstance().isHistogramSupport()) { + int[] histogramStats = result.get(CaptureModule.histogramStats); + if (histogramStats != null && mHiston) { /*The first element in the array stores max hist value . Stats data begin from second value*/ - synchronized (statsdata) { - System.arraycopy(histogramStats, 0, statsdata, 0, 1024); - } - updateGraghView(); + synchronized (statsdata) { + System.arraycopy(histogramStats, 0, statsdata, 0, 1024); } + updateGraghView(); } } processCaptureResult(result); @@ -3868,7 +3867,7 @@ public class CaptureModule implements CameraModule, PhotoController, private void applyHistogram(CaptureRequest.Builder request) { String value = mSettingsManager.getValue(SettingsManager.KEY_HISTOGRAM); - if (value != null && isBackCamera()) { + if (value != null ) { if (value.equals("enable")){ final byte enable = 1; request.set(CaptureModule.histMode, enable); -- cgit v1.2.3