summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-07-18 21:59:35 (GMT)
committerSteve Kondik <steve@cyngn.com>2016-08-18 22:07:20 (GMT)
commitdb4f5342e80662985c8bcb208e4fabf5c8db8a1a (patch)
tree2d03dd343a3e0329225b1c737db8995f422adc04
parent1a18632c11d3f4593547e9afe309cad1f4ea7204 (diff)
downloadandroid_packages_apps_Snap-db4f5342e80662985c8bcb208e4fabf5c8db8a1a.zip
android_packages_apps_Snap-db4f5342e80662985c8bcb208e4fabf5c8db8a1a.tar.gz
android_packages_apps_Snap-db4f5342e80662985c8bcb208e4fabf5c8db8a1a.tar.bz2
SnapdragonCamera: Force removing preview cover
A workaround to remove preview cover after picture is taken, if preview cover is not removed right after preview started. Change-Id: I723d70fde6ecaf7302714daa6648c85d8a40d1b4 CRs-Fixed: 1016691
-rw-r--r--src/com/android/camera/PhotoModule.java5
-rw-r--r--src/com/android/camera/PhotoUI.java9
2 files changed, 14 insertions, 0 deletions
diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java
index 1d49cfb..ea717a4 100644
--- a/src/com/android/camera/PhotoModule.java
+++ b/src/com/android/camera/PhotoModule.java
@@ -1239,6 +1239,11 @@ public class PhotoModule
mUI.stopSelfieFlash();
mUI.enableShutter(true);
}
+ if (mUI.isPreviewCoverVisible()) {
+ // When take picture request is sent before starting preview, onPreviewFrame()
+ // callback doesn't happen so removing preview cover here, instead.
+ mUI.hidePreviewCover();
+ }
if (mPaused) {
return;
}
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java
index 23ed1ba..7762d14 100644
--- a/src/com/android/camera/PhotoUI.java
+++ b/src/com/android/camera/PhotoUI.java
@@ -1164,6 +1164,15 @@ public class PhotoUI implements PieListener,
}
}
+ public boolean isPreviewCoverVisible() {
+ if ((mPreviewCover != null) &&
+ (mPreviewCover.getVisibility() == View.VISIBLE)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
public void onPause() {
cancelCountDown();