Assigned
Status Update
Comments
vi...@google.com <vi...@google.com> #2
We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
No update yet.
We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
Description
I'm investigating a bug in the application that happens mainly on AOSP based ROMs and it seems that I found some controversy between documentation and code.
First of all, let's see the doc on TelecommManager for getUserSelectedOutgoingPhoneAccount() method. The doc says that the caller requires only Manifest.permission.READ_PHONE_STATE.
But the main trouble is that isDialerOrPrivileged checks for READ_PRIVILEGED_PHONE_STATE and fails otherwise. This contradicts to the documentation which requires only READ_PHONE_STATE permission.
How this applies to the bug which I'm investigating? Well, the app tries to produce the ringtone and fails to do so with the following stacktrace:
See the getDefaultOutgoingPhoneAccount in the first line? This is the wrong second argument passed to the isDialerOrPrivileged method. The actual method called is getUserSelectedOutgoingPhoneAccount which is reported on the 6th line.