OSDN Git Service

Release surface texture to fix gray camera preview
authorDoris Liu <tianliu@google.com>
Fri, 22 Feb 2013 22:31:17 +0000 (14:31 -0800)
committerDoris Liu <tianliu@google.com>
Fri, 22 Feb 2013 23:44:02 +0000 (15:44 -0800)
Bug: 8133672

Change-Id: Ie71c8fd1ea07a19eccf5bbd773054e095426fe80

src/com/android/camera/PhotoModule.java

index 15f4046..e244d6b 100644 (file)
@@ -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.