From b8cf250c6351cd96f069fd16087db5e7b0f6b1d6 Mon Sep 17 00:00:00 2001 From: Doris Liu Date: Fri, 22 Feb 2013 14:31:17 -0800 Subject: Release surface texture to fix gray camera preview Bug: 8133672 Change-Id: Ie71c8fd1ea07a19eccf5bbd773054e095426fe80 --- src/com/android/camera/PhotoModule.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/com/android/camera/PhotoModule.java b/src/com/android/camera/PhotoModule.java index 15f40461d..e244d6b88 100644 --- a/src/com/android/camera/PhotoModule.java +++ b/src/com/android/camera/PhotoModule.java @@ -1586,10 +1586,9 @@ public class PhotoModule mCountDownView.cancelCountDown(); // Close the camera now because other activities may need to use it. closeCamera(); - if (mSurfaceTexture != null) { - ((CameraScreenNail) mActivity.mCameraScreenNail).releaseSurfaceTexture(); - mSurfaceTexture = null; - } + // Release surface texture. + ((CameraScreenNail) mActivity.mCameraScreenNail).releaseSurfaceTexture(); + mSurfaceTexture = null; resetScreenOn(); // Clear UI. -- cgit v1.2.3