diff options
author | Andy Huibers <andyhuibers@google.com> | 2013-11-06 14:37:26 -0800 |
---|---|---|
committer | Andy Huibers <andyhuibers@google.com> | 2013-11-07 14:20:48 -0800 |
commit | fccf83bd342a3a83dc284525488e69f25e4667c4 (patch) | |
tree | 56b4a59923d4d3de3ed140cd8a815f2fcc8e5d68 /src/com | |
parent | 2f878d54ecbb62ef09aa2b0152dea983e598724f (diff) | |
download | android_packages_apps_Snap-fccf83bd342a3a83dc284525488e69f25e4667c4.tar.gz android_packages_apps_Snap-fccf83bd342a3a83dc284525488e69f25e4667c4.tar.bz2 android_packages_apps_Snap-fccf83bd342a3a83dc284525488e69f25e4667c4.zip |
hide preview cover on arrival of new preview data if hidden
Bug: 11433257
Change-Id: I7225ebf1d84bbefd2f952cfa524720a7e76e7181
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/android/camera/PhotoUI.java | 6 | ||||
-rw-r--r-- | src/com/android/camera/VideoUI.java | 5 | ||||
-rw-r--r-- | src/com/android/camera/WideAnglePanoramaUI.java | 5 |
3 files changed, 12 insertions, 4 deletions
diff --git a/src/com/android/camera/PhotoUI.java b/src/com/android/camera/PhotoUI.java index 524cd4654..744802f64 100644 --- a/src/com/android/camera/PhotoUI.java +++ b/src/com/android/camera/PhotoUI.java @@ -286,7 +286,6 @@ public class PhotoUI implements PieListener, public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { synchronized (mSurfaceTextureLock) { Log.v(TAG, "SurfaceTexture ready."); - mPreviewCover.setVisibility(View.GONE); mSurfaceTexture = surface; mController.onPreviewUIReady(); // Workaround for b/11168275, see b/10981460 for more details @@ -314,7 +313,10 @@ public class PhotoUI implements PieListener, @Override public void onSurfaceTextureUpdated(SurfaceTexture surface) { - // Do nothing. + // Make sure preview cover is hidden if preview data is available. + if (mPreviewCover.getVisibility() != View.GONE) { + mPreviewCover.setVisibility(View.GONE); + } } public View getRootView() { diff --git a/src/com/android/camera/VideoUI.java b/src/com/android/camera/VideoUI.java index 02b256754..8b01ba4b8 100644 --- a/src/com/android/camera/VideoUI.java +++ b/src/com/android/camera/VideoUI.java @@ -718,7 +718,6 @@ public class VideoUI implements PieRenderer.PieListener, @Override public void onSurfaceTextureAvailable(SurfaceTexture surface, int width, int height) { mSurfaceTexture = surface; - mPreviewCover.setVisibility(View.GONE); mController.onPreviewUIReady(); } @@ -736,6 +735,10 @@ public class VideoUI implements PieRenderer.PieListener, @Override public void onSurfaceTextureUpdated(SurfaceTexture surface) { + // Make sure preview cover is hidden if preview data is available. + if (mPreviewCover.getVisibility() != View.GONE) { + mPreviewCover.setVisibility(View.GONE); + } } // SurfaceHolder callbacks diff --git a/src/com/android/camera/WideAnglePanoramaUI.java b/src/com/android/camera/WideAnglePanoramaUI.java index 1546958de..268c82b2b 100644 --- a/src/com/android/camera/WideAnglePanoramaUI.java +++ b/src/com/android/camera/WideAnglePanoramaUI.java @@ -226,7 +226,6 @@ public class WideAnglePanoramaUI implements @Override public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i2) { mSurfaceTexture = surfaceTexture; - mPreviewCover.setVisibility(View.GONE); mController.onPreviewUIReady(); } @@ -245,6 +244,10 @@ public class WideAnglePanoramaUI implements @Override public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) { + // Make sure preview cover is hidden if preview data is available. + if (mPreviewCover.getVisibility() != View.GONE) { + mPreviewCover.setVisibility(View.GONE); + } } private void hideDirectionIndicators() { |