OSDN Git Service

Remove OnFrameAvailableListener in tear down
authorJohn Reck <jreck@google.com>
Mon, 1 Oct 2012 22:26:10 +0000 (15:26 -0700)
committerJohn Reck <jreck@google.com>
Mon, 1 Oct 2012 22:26:10 +0000 (15:26 -0700)
 Bug: 7217305

Change-Id: I79d1741cd757b2cc15a42336153af755ae84bd57

src/com/android/gallery3d/ui/SurfaceTextureScreenNail.java

index ee5fe3d..1930e38 100644 (file)
@@ -60,6 +60,7 @@ public abstract class SurfaceTextureScreenNail implements ScreenNail,
 
     @TargetApi(ApiHelper.VERSION_CODES.ICE_CREAM_SANDWICH)
     private static void releaseSurfaceTexture(SurfaceTexture st) {
+        st.setOnFrameAvailableListener(null);
         if (ApiHelper.HAS_RELEASE_SURFACE_TEXTURE) {
             st.release();
         }