|
|
@ -196,12 +196,14 @@ class Camera1 extends CameraController implements Camera.PreviewCallback { |
|
|
|
LOG.i("onStop:", "About to clean up."); |
|
|
|
LOG.i("onStop:", "About to clean up."); |
|
|
|
mHandler.get().removeCallbacks(mPostFocusResetRunnable); |
|
|
|
mHandler.get().removeCallbacks(mPostFocusResetRunnable); |
|
|
|
if (mCamera != null) { |
|
|
|
if (mCamera != null) { |
|
|
|
|
|
|
|
|
|
|
|
LOG.i("onStop:", "Clean up.", "Ending video?", mIsCapturingVideo); |
|
|
|
LOG.i("onStop:", "Clean up.", "Ending video?", mIsCapturingVideo); |
|
|
|
if (mIsCapturingVideo) endVideo(); |
|
|
|
if (mIsCapturingVideo) endVideo(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
LOG.i("onStop:", "Clean up.", "Stopping preview."); |
|
|
|
LOG.i("onStop:", "Clean up.", "Stopping preview."); |
|
|
|
mCamera.stopPreview(); |
|
|
|
mCamera.stopPreview(); |
|
|
|
|
|
|
|
mCamera.setPreviewCallback(null); |
|
|
|
LOG.i("onStop:", "Clean up.", "Stopped preview."); |
|
|
|
LOG.i("onStop:", "Clean up.", "Stopped preview."); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
LOG.w("onStop:", "Clean up.", "Exception while stopping preview."); |
|
|
|
LOG.w("onStop:", "Clean up.", "Exception while stopping preview."); |
|
|
|