@Override
  protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
    super.onMeasure(widthMeasureSpec, heightMeasureSpec);

    // Each child needs to measure itself.
    for (int i = 0; i < getChildCount(); i++) {
      getChildAt(i).measure(widthMeasureSpec, heightMeasureSpec);
    }
  }
Stops the camera preview and releases the resources of the underlying camera source.
java/com/google/android/apps/authenticator/barcode/preview/CameraSourcePreview.java