Merge change 20717 into donut

* changes:
  Release the camera in surfaceDestroyed().
This commit is contained in:
Android (Google) Code Review
2009-08-11 10:31:48 -07:00

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
// important to release it when the activity is paused.
mCamera.stopPreview();
mCamera.release();
mCamera = null;
}