|
|
@ -98,8 +98,7 @@ abstract class CameraController implements CameraPreview.SurfaceCallback { |
|
|
|
mCameraCallbacks.dispatchOnCameraOpened(mOptions); |
|
|
|
mCameraCallbacks.dispatchOnCameraOpened(mOptions); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
LOG.e("Error while starting the camera engine.", e); |
|
|
|
mCameraCallbacks.onError("Error while starting the camera engine.", e); |
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -122,8 +121,7 @@ abstract class CameraController implements CameraPreview.SurfaceCallback { |
|
|
|
mCameraCallbacks.dispatchOnCameraClosed(); |
|
|
|
mCameraCallbacks.dispatchOnCameraClosed(); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
LOG.e("Error while stopping the camera engine.", e); |
|
|
|
mCameraCallbacks.onError("Error while stopping the camera engine.", e); |
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
@ -140,8 +138,8 @@ abstract class CameraController implements CameraPreview.SurfaceCallback { |
|
|
|
LOG.i("Stop immediately. Stopped. State is:", ss()); |
|
|
|
LOG.i("Stop immediately. Stopped. State is:", ss()); |
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
// Do nothing.
|
|
|
|
// Do nothing.
|
|
|
|
LOG.i("Stop immediately. Exception while stopping.", e); |
|
|
|
|
|
|
|
mState = STATE_STOPPED; |
|
|
|
mState = STATE_STOPPED; |
|
|
|
|
|
|
|
mCameraCallbacks.onError("Stop immediately. Exception while stopping.", e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -170,9 +168,7 @@ abstract class CameraController implements CameraPreview.SurfaceCallback { |
|
|
|
mCameraCallbacks.dispatchOnCameraOpened(mOptions); |
|
|
|
mCameraCallbacks.dispatchOnCameraOpened(mOptions); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
LOG.e("Error while restarting the camera engine.", e); |
|
|
|
mCameraCallbacks.onError("Error while restarting the camera engine.", e); |
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|