Skip to content

Commit 664d72e

Browse files
author
Chih-yu Huang
committed
Clear callbacks in camera stopPreview.
Clear those callbacks to remove the references so the memory can be recycled. bug:5358774 Change-Id: I3b6034a1891126b3437a6744013f38a64f5bb03b
1 parent dd33bf0 commit 664d72e

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/java/android/hardware/Camera.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,12 @@ public interface PreviewCallback
480480
public final void stopPreview() {
481481
_stopPreview();
482482
mFaceDetectionRunning = false;
483+
484+
mShutterCallback = null;
485+
mRawImageCallback = null;
486+
mPostviewCallback = null;
487+
mJpegCallback = null;
488+
mAutoFocusCallback = null;
483489
}
484490

485491
private native final void _stopPreview();

0 commit comments

Comments
 (0)