summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJay Wang <jaywang@codeaurora.org>2016-07-28 13:38:48 -0700
committerSteve Kondik <steve@cyngn.com>2016-08-18 15:10:44 -0700
commit6304f00be7a309497a93544ecce5e2d322434967 (patch)
tree5a3d43647d955931b8c42f276ddbea017df99956 /src
parenta780bd9965eb4adbcf14e5162c5b6f9a2a92ea97 (diff)
downloadandroid_packages_apps_Snap-6304f00be7a309497a93544ecce5e2d322434967.zip
android_packages_apps_Snap-6304f00be7a309497a93544ecce5e2d322434967.tar.gz
android_packages_apps_Snap-6304f00be7a309497a93544ecce5e2d322434967.tar.bz2
SnapdragonCamera: Force removing preview cover for camcorder
A workaround to remove preview cover when starting recording, if preview cover is not removed right after preview started. Change-Id: I0870ddeec9d3f40a1459315e91e5230155be9f13 CRs-Fixed: 1016691
Diffstat (limited to 'src')
-rw-r--r--src/com/android/camera/VideoModule.java6
-rw-r--r--src/com/android/camera/VideoUI.java9
2 files changed, 14 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index ed20b91..af72a29 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1895,7 +1895,11 @@ public class VideoModule implements CameraModule,
mUI.cancelAnimations();
mUI.setSwipingEnabled(false);
mUI.hideUIwhileRecording();
-
+ // When recording request is sent before starting preview, onPreviewFrame()
+ // callback doesn't happen so removing preview cover here, instead.
+ if (mUI.isPreviewCoverVisible()) {
+ mUI.hidePreviewCover();
+ }
mActivity.updateStorageSpaceAndHint();
if (mActivity.getStorageSpaceBytes() <= Storage.LOW_STORAGE_THRESHOLD_BYTES) {
Log.v(TAG, "Storage issue, ignore the start request");
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 9eecd6b..b983cd1 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -133,6 +133,15 @@ public class VideoUI implements PieRenderer.PieListener,
}
}
+ public boolean isPreviewCoverVisible() {
+ if ((mPreviewCover != null) &&
+ (mPreviewCover.getVisibility() == View.VISIBLE)) {
+ return true;
+ } else {
+ return false;
+ }
+ }
+
private class SettingsPopup extends PopupWindow {
public SettingsPopup(View popup) {
super(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);