-
Notifications
You must be signed in to change notification settings - Fork 202
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 crash on Samsung Android 10 that call this during parent init. #62
Conversation
Can you move the check to the beginning of // Samsung Android 10 might call this in super class constructor. ? Meanwhile, did you confirm if this is the only method that's called in super class constructor? Or, can you confirm that this is enough to fix crash on Samsung devices? I cann't test for myself because I don't own a Samsung device. |
I can confirm this fix the issue for my users, I can't reproduce as no S10 either and strangely the crash data never reached Play Console so had to ask for users full bug Reports, maybe because it's still a beta build of Android. Anyway PR updated. |
Thanks! |
Any chance to have a 1.3.3 release so I can remove my custom aar ? :) |
Planning to do this tomorrow. |
Released in v1.3.3. |
@zhanghai @Tolriq This is not a good solution, by code mProgressTintInfo can never be null. Perhaps Samsung is trying to somehow influence through reflection on this field for its OS shell. Look at the ProgressBar source code, it has exactly the same field. I suggest renaming this field so that the UI displays user/library colors instead of Samsung |
@Vibragimov this is the correct solution and best of all it works, learn about initialization phases in Java when calling super constructors in child constructors :) Samsung is just trying to get current tintlist during init phase probably because they are using some stupid hacks to implement their dark mode that is a little different than stock Android, but this does not change anything about the fact that the library will have the proper values applied later on for the rendering. |
I agree with @Tolriq's analysis. It doesn't make sense for Samsung to use reflection, because they can modify any framework code easily. Meanwhile, this fix did fix the issue according to his testing. |
I have an exact same experience.
Since, we just install Firebase Crashlytics few weeks back, we are not sure, whether this issue has occured since the early day, or since Samsung Galaxy S10 has performed some software update (around November time frame?!) We have another high number of crashes (Not related to MaterialRatingBar) these day around December time frame, for Samsung Galaxy S10 - https://issuetracker.google.com/issues/147020028 I was wondering, does Samsung Galaxy S10 introduces some buggy software code update recently, around November time frame? |
Hi Tolriq, Did you see this crash at Samsung Galaxy S10 Android 10 only? Did you see it in Samsung Galaxy S10 Android 9? As, I saw you reported this problem in early of Nov. But, from Internet news, it seems that Samsung only push Android 9 to Android 10 update to users, around December time frame. |
As per title.