@Override
    protected Parcelable onSaveInstanceState() {
        Parcelable superState = super.onSaveInstanceState();

        Bundle myState = new Bundle();
        myState.putParcelable("super", superState);
        myState.putBoolean("torch", torchOn);
        return myState;
    }
Calculate framing rectangle, relative to the preview frame.

Note that the SurfaceView may be larger than the container.

Override this for more control over the framing rect calculations.

@param container this container, with left = top = 0
@param surface   the SurfaceView, relative to this container
@return the framing rect, relative to this container
zxing-android-embedded/src/com/journeyapps/barcodescanner/CameraPreview.java