Fixes #90 Remove UncaughtExceptionHandler from CameraController in stopImmediately

pull/92/head
Andrew Munn 8 years ago
parent b13f80b751
commit 42154e1df5
  1. 2
      cameraview/src/main/java/com/otaliastudios/cameraview/CameraController.java

@ -145,6 +145,8 @@ abstract class CameraController implements CameraPreview.SurfaceCallback {
LOG.i("Stop immediately. State was:", ss()); LOG.i("Stop immediately. State was:", ss());
mState = STATE_STOPPING; mState = STATE_STOPPING;
onStop(); onStop();
// Prevent leaking CameraController.
mHandler.getThread().setUncaughtExceptionHandler(null);
mState = STATE_STOPPED; mState = STATE_STOPPED;
LOG.i("Stop immediately. Stopped. State is:", ss()); LOG.i("Stop immediately. Stopped. State is:", ss());
} catch (Exception e) { } catch (Exception e) {

Loading…
Cancel
Save