summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanny Baumann <dannybaumann@web.de>2017-01-28 13:35:40 +0100
committerZhao Wei Liew <zhaoweiliew@gmail.com>2017-02-11 01:36:05 +0000
commit413e9bd770cbd868929d6c09318b54620c059169 (patch)
tree8ffb82213ccb0536ae4dc33fe58040c4583cbf48
parent33c7742af160ad441c3e73805eaa999bd316f3be (diff)
downloadandroid_packages_apps_Snap-413e9bd770cbd868929d6c09318b54620c059169.zip
android_packages_apps_Snap-413e9bd770cbd868929d6c09318b54620c059169.tar.gz
android_packages_apps_Snap-413e9bd770cbd868929d6c09318b54620c059169.tar.bz2
Fix thumbnail sometimes not being shown initially in video mode.
Happened due to a race condition between surface creation and view initialization. Change-Id: I701eaa16c09a246806f5d148d0ce90f1d132e3f3 (cherry picked from commit 9936197ae3607b0fec5eb343725d6056b6d86b67)
-rw-r--r--src/com/android/camera/VideoUI.java26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java
index 029dda9..0b51970 100644
--- a/src/com/android/camera/VideoUI.java
+++ b/src/com/android/camera/VideoUI.java
@@ -202,6 +202,19 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
}
});
+ if (!mActivity.isSecureCamera()) {
+ mThumbnail = (ImageView) mRootView.findViewById(R.id.preview_thumb);
+ mThumbnail.setOnClickListener(new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ // Do not allow navigation to filmstrip during video recording
+ if (!mRecordingStarted && !isCameraControlsAnimating()) {
+ mActivity.gotoGallery();
+ }
+ }
+ });
+ }
+
mRenderOverlay = (RenderOverlay) mRootView.findViewById(R.id.render_overlay);
mFocusRing = (FocusRing) mRootView.findViewById(R.id.focus_ring);
mShutterButton = (ShutterButton) mRootView.findViewById(R.id.shutter_button);
@@ -529,19 +542,6 @@ public class VideoUI extends BaseUI implements PieRenderer.PieListener,
initializeZoom(params);
mActivity.setPreviewGestures(mGestures);
-
- if (!mActivity.isSecureCamera()) {
- mThumbnail = (ImageView) mRootView.findViewById(R.id.preview_thumb);
- mThumbnail.setOnClickListener(new OnClickListener() {
- @Override
- public void onClick(View v) {
- // Do not allow navigation to filmstrip during video recording
- if (!mRecordingStarted && !isCameraControlsAnimating()) {
- mActivity.gotoGallery();
- }
- }
- });
- }
}
public boolean isCameraControlsAnimating() {