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

RingtonePreferenceDialogFragmentCompat throws NumberFormatException on Android 10 #7

Open
fstanis opened this issue Dec 2, 2019 · 1 comment

Comments

@fstanis
Copy link

fstanis commented Dec 2, 2019

12-02 10:42:17.819 20550 20550 E AndroidRuntime: java.lang.NumberFormatException: For input string: "notification_sound"
12-02 10:42:17.819 20550 20550 E AndroidRuntime: 	at java.lang.Long.parseLong(Long.java:594)
12-02 10:42:17.819 20550 20550 E AndroidRuntime: 	at java.lang.Long.parseLong(Long.java:636)
12-02 10:42:17.819 20550 20550 E AndroidRuntime: 	at android.content.ContentUris.parseId(ContentUris.java:89)
12-02 10:42:17.819 20550 20550 E AndroidRuntime: 	at android.media.RingtoneManager.getRingtonePosition(RingtoneManager.java:513)
12-02 10:42:17.819 20550 20550 E AndroidRuntime: 	at com.takisoft.preferencex.g.a(Unknown Source:146)
12-02 10:42:17.819 20550 20550 E AndroidRuntime: 	at com.takisoft.preferencex.g.a(Unknown Source:11)

The error seems to come from here:

It seems Android 10 calls ContentUris.parseId inside getRingtonePosition which throws if the last segment of the Uri isn't a number.

@mocle
Copy link

mocle commented Jan 3, 2020

I'm facing the same problem right now. But I'm of the opinion that the whole thing has already run successfully on Android 10...
Any updates on this issue?

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

No branches or pull requests

2 participants