Fatal exception when torch is clicked on a device which has no flashlight.
See original GitHub issuejava.lang.RuntimeException: setParameters failed E/AndroidRuntime(24312): at android.hardware.Camera.native_setParameters(Native Method) E/AndroidRuntime(24312): at android.hardware.Camera.setParameters(Camera.java:2162) E/AndroidRuntime(24312): at com.uuzuche.lib_zxing.activity.CodeUtils.isLightEnable(CodeUtils.java:211) E/AndroidRuntime(24312): at com.shinow.qrscan.SecondActivity$1.onClick(SecondActivity.java:75) E/AndroidRuntime(24312): at android.view.View.performClick(View.java:7346) E/AndroidRuntime(24312): at android.view.View.performClickInternal(View.java:7312) E/AndroidRuntime(24312): at android.view.View.access$3200(View.java:846) E/AndroidRuntime(24312): at android.view.View$PerformClick.run(View.java:27801) E/AndroidRuntime(24312): at android.os.Handler.handleCallback(Handler.java:873) E/AndroidRuntime(24312): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(24312): at android.os.Looper.loop(Looper.java:214) E/AndroidRuntime(24312): at android.app.ActivityThread.main(ActivityThread.java:7156) E/AndroidRuntime(24312): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(24312): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494) E/AndroidRuntime(24312): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975) I/Process (24312): Sending signal. PID: 24312 SIG: 9 Lost connection to device.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
im ended up fork and change the java codes by myself, and i add some try catch on turn on/off callback so i can handle if there’s exception occured.
file on
SecondActivity.java
yeah i think so, in case you want to fix this issue ASAP, you can use that alternative. i’ve made a pull request for this. but i can’t wait for the maintainer accept this so right now im using custom fork until it accepted or fixed by them.
and also sorry for my bad english 😊