public void stop() {
        // To reduce the effect of possible leaks, we clear any references we have to external
        // objects.
        if (this.orientationEventListener != null) {
            this.orientationEventListener.disable();
        }
        this.orientationEventListener = null;
        this.windowManager = null;
        this.callback = null;
    }
Hack to detect when screen rotation is reversed, since that does not cause a configuration change.

If it is changed through something other than the sensor (e.g. programmatically), this may not work.

See http://stackoverflow.com/q/9909037
zxing-android-embedded/src/com/journeyapps/barcodescanner/RotationListener.java