diff options
author | Jay Wang <jaywang@codeaurora.org> | 2016-04-05 17:54:11 -0700 |
---|---|---|
committer | Jay Wang <jaywang@codeaurora.org> | 2016-04-07 16:49:00 -0700 |
commit | 04ef4a0580634fbaf1e2441485b8f37650aaa2fe (patch) | |
tree | 4b668305d3e886b58ebf9be3663c5f40bf7400af /src/com/android/camera/PhotoModule.java | |
parent | 3618eb79912c36216b197580e54e366ab19d2a61 (diff) | |
download | android_packages_apps_Snap-04ef4a0580634fbaf1e2441485b8f37650aaa2fe.tar.gz android_packages_apps_Snap-04ef4a0580634fbaf1e2441485b8f37650aaa2fe.tar.bz2 android_packages_apps_Snap-04ef4a0580634fbaf1e2441485b8f37650aaa2fe.zip |
SnapdragonCamera: Fix auto HDR indication issue
1. Fix the logic on validating the auto HDR detection.
2. Move teh HDR indicator to more visible area
CRs-Fixed: 999660
Change-Id: I797f69edc847b94f60c637373b80278783c3dac8
Diffstat (limited to 'src/com/android/camera/PhotoModule.java')
-rw-r--r-- | src/com/android/camera/PhotoModule.java | 39 |
1 files changed, 21 insertions, 18 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 589f55152..d7353ba2e 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -1126,23 +1126,26 @@ public class PhotoModule for (int i =0;i<3;i++) { metadata[i] = byteToInt( (byte []) data, i*4); } - if (metadata[2] == 1) { - mAutoHdrEnable = true; - mActivity.runOnUiThread(new Runnable() { - public void run() { - if (mDrawAutoHDR != null) - mDrawAutoHDR.AutoHDR(); - } - }); - } - else { - mAutoHdrEnable = false; - mActivity.runOnUiThread(new Runnable() { - public void run() { - if (mDrawAutoHDR != null) - mDrawAutoHDR.AutoHDR(); - } - }); + /* Checking if the meta data is for auto HDR */ + if (metadata[0] == 3) { + if (metadata[2] == 1) { + mAutoHdrEnable = true; + mActivity.runOnUiThread(new Runnable() { + public void run() { + if (mDrawAutoHDR != null) + mDrawAutoHDR.AutoHDR(); + } + }); + } + else { + mAutoHdrEnable = false; + mActivity.runOnUiThread(new Runnable() { + public void run() { + if (mDrawAutoHDR != null) + mDrawAutoHDR.AutoHDR(); + } + }); + } } } } @@ -4976,7 +4979,7 @@ class DrawAutoHDR extends View{ AutoHDRPaint.setStyle(Paint.Style.STROKE); AutoHDRPaint.setColor(Color.MAGENTA); AutoHDRPaint.setStrokeWidth(1); - AutoHDRPaint.setTextSize(16); + AutoHDRPaint.setTextSize(32); AutoHDRPaint.setAlpha (255); canvas.drawText("HDR On",200,100,AutoHDRPaint); } |