public void release() {
    if (cameraSource != null) {
      cameraSource.release();
      cameraSource = null;
    }
  }
Stops the camera preview and releases the resources of the underlying camera source.
java/com/google/android/apps/authenticator/barcode/preview/CameraSourcePreview.java