summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjunjiez <junjiez@codeaurora.org>2017-01-19 14:22:29 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2017-01-18 22:24:38 -0800
commit27315e9458ab47c338b4008cb012aa3d6472ad04 (patch)
tree332ab7eb56ee8912ebf0cf0fba0ddb6c4c098ac1
parent36f2a32a9277b09badec5a16d7f6b8c9b581015e (diff)
downloadandroid_packages_apps_Snap-27315e9458ab47c338b4008cb012aa3d6472ad04.tar.gz
android_packages_apps_Snap-27315e9458ab47c338b4008cb012aa3d6472ad04.tar.bz2
android_packages_apps_Snap-27315e9458ab47c338b4008cb012aa3d6472ad04.zip
SnapdragonCamera: enable histogram for front camera
enable histogram for front camera, allow both cameras to set histogram key. Change-Id: I23cbcec81dd1c3149ee361e2d726683b6ecc5394 CRs-Fixed: 1109689
-rwxr-xr-xsrc/com/android/camera/CaptureModule.java17
1 files changed, 8 insertions, 9 deletions
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);