natario1/CameraView

Camera orientation changed value not sanitized

EzequielAdrianM opened this issue · 0 comments

Here is the piece of code, isn't 1 a weird orientation angle?

I will try to see if i can fix it and append the working solution to others pull requests i made to help you with your library.

Fatal Exception: java.lang.IllegalStateException: This value is not sanitized: 1
       at com.otaliastudios.cameraview.engine.offset.Angles.sanitizeInput(Angles.java:128)
       at com.otaliastudios.cameraview.engine.offset.Angles.setDeviceOrientation(Angles.java:65)
       at com.otaliastudios.cameraview.CameraView$CameraCallbacks.onDeviceOrientationChanged(CameraView.java:2357)
       at com.otaliastudios.cameraview.internal.OrientationHelper$1.onOrientationChanged(OrientationHelper.java:108)
       at android.view.OrientationEventListener$SensorEventListenerImpl.onSensorChanged(OrientationEventListener.java:143)
       at android.hardware.SystemSensorManager$SensorEventQueue.dispatchSensorEvent(SystemSensorManager.java:870)
       at android.os.MessageQueue.nativePollOnce(MessageQueue.java)
       at android.os.MessageQueue.next(MessageQueue.java:335)
       at android.os.Looper.loop(Looper.java:190)
       at android.app.ActivityThread.main(ActivityThread.java:7834)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:621)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)