Merge change 20717 into donut
* changes: Release the camera in surfaceDestroyed().
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user