chenxiaolong / BCR

A Basic Call Recorder for rooted Android devices
GNU General Public License v3.0
1.67k stars 109 forks source link

Fix rare crash in quick settings tile caused by an Android bug #392

Closed PatrykMis closed 1 year ago

PatrykMis commented 1 year ago

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.service.quicksettings.Tile.setState(int)' on a null object reference

I'm not absolutely sure if I did it right. This random crash is extremely rare (one on a few weeks/months) and it's not related to any activity, it did never happen while recording.

Probably this PR might improve code safety as a side effect too. ;)

chenxiaolong commented 1 year ago

Yet another Android bug :slightly_frowning_face:

Thanks for the PR!