Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed: Fix NullPointerException when running bell/vibrate on Samsung …
…devices on android 8 and handled deprecated code Apparently occurs on only Samsung android 8 devices and there is no fix for vibrator except catching the exception so that app doesn't crash. https://gitlab.com/juanitobananas/wave-up/-/issues/131 overbound/SonicTimeTwisted#131 https://web.archive.org/web/20201114040257/https://www.badlogicgames.com/forum/viewtopic.php?t=28507 ``` java.lang.NullPointerException: Attempt to read from field 'android.os.VibrationEffect com.android.server.VibratorService$Vibration.mEffect' on a null object reference at android.os.Parcel.readException(Parcel.java:2035) at android.os.Parcel.readException(Parcel.java:1975) at android.os.IVibratorService$Stub$Proxy.vibrate(IVibratorService.java:292) at android.os.SystemVibrator.vibrate(SystemVibrator.java:81) at android.os.Vibrator.vibrate(Vibrator.java:191) at android.os.Vibrator.vibrate(Vibrator.java:110) at android.os.Vibrator.vibrate(Vibrator.java:89) at com.termux.app.terminal.io.BellHandler$1.run(BellHandler.java:37) at com.termux.app.terminal.io.BellHandler.doBell(BellHandler.java:55) at com.termux.app.terminal.TermuxTerminalSessionClient.onBell(TermuxTerminalSessionClient.java:178) at com.termux.terminal.TerminalSession.onBell(TerminalSession.java:278) ```
- Loading branch information