am c5c912e4: Merge change 20717 into donut

Merge commit 'c5c912e49bdc89a7a7778b66d1ca6b00440d2888'

* commit 'c5c912e49bdc89a7a7778b66d1ca6b00440d2888':
  Release the camera in surfaceDestroyed().
This commit is contained in:
Wu-cheng Li
2009-08-11 18:12:14 -07:00
committed by Android Git Automerger

View File

@@ -78,6 +78,7 @@ class Preview extends SurfaceView implements SurfaceHolder.Callback {
// Because the CameraDevice object is not a shared resource, it's very // Because the CameraDevice object is not a shared resource, it's very
// important to release it when the activity is paused. // important to release it when the activity is paused.
mCamera.stopPreview(); mCamera.stopPreview();
mCamera.release();
mCamera = null; mCamera = null;
} }