Remove UncaughtExceptionHandler from CameraController in stopImmediately (#92)

* Fixes #90 Remove UncaughtExceptionHandler from CameraController in stopImmediately

* Move setUncaughtExceptionHandler(null) before onStop()
pull/93/head^2
Andrew Munn 7 years ago committed by Mattia Iavarone
parent b13f80b751
commit f3317ad4ee
  1. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraController.java

@ -144,6 +144,8 @@ abstract class CameraController implements CameraPreview.SurfaceCallback {
// Don't check, try stop again.
LOG.i("Stop immediately. State was:", ss());
mState = STATE_STOPPING;
// Prevent leaking CameraController.
mHandler.getThread().setUncaughtExceptionHandler(null);
onStop();
mState = STATE_STOPPED;
LOG.i("Stop immediately. Stopped. State is:", ss());

Loading…
Cancel
Save