Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

PatrykMis
Copy link
Contributor

@PatrykMis PatrykMis commented Jul 30, 2023

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. ;)

Signed-off-by: Patryk Miś <foss@patrykmis.com>
@PatrykMis PatrykMis force-pushed the upstream/cr-tile-null-check branch from 9016f52 to 14e7894 Compare July 30, 2023 16:04
@chenxiaolong chenxiaolong merged commit 765dbd7 into chenxiaolong:master Jul 31, 2023
1 check passed
@chenxiaolong
Copy link
Owner

Yet another Android bug 🙁

Thanks for the PR!

chenxiaolong added a commit that referenced this pull request Jul 31, 2023
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
@PatrykMis PatrykMis deleted the upstream/cr-tile-null-check branch July 31, 2023 00:58
@PatrykMis PatrykMis changed the title Prevent very rare crash due to NullPointerException Fix rare crash in quick settings tile caused by an Android bug Aug 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants