Fixed
Status Update
Comments
lb...@gmail.com <lb...@gmail.com> #2
You can see how much mess there is for some devices, as there are questions about it and many answers that are not even mentioning the official API, or consider it as not as written in the docs:
https://stackoverflow.com/q/71220453/878126
https://stackoverflow.com/q/50173859/878126
https://stackoverflow.com/q/63834168/878126
https://stackoverflow.com/q/53905053/878126
ra...@google.com <ra...@google.com>
vi...@google.com <vi...@google.com> #4
We’ve shared this with our product and engineering teams and will continue to provide updates as more information becomes available.
lb...@gmail.com <lb...@gmail.com> #5
@4 Attached sample project (based on the one from Github I've mentioned), and a video showing the issue on the device I've mentioned.
Again, this is a widespread behavior, and while not all devices have this issue, a lot do have it.
Again, this is a widespread behavior, and while not all devices have this issue, a lot do have it.
lb...@gmail.com <lb...@gmail.com> #6 Restricted
Restricted
Comment has been deleted.
lb...@gmail.com <lb...@gmail.com> #7
I've tested on some other devices with multi-SIM, and they work fine with official API:
- Xiaomi Redmi 8 with Android 10 .
- Vivo V23 5G with Android 12 .
So, so far the only one I have in the office that shows this issue (users have this too) is "Honor Magic4 pro" with Android 12.
While this can be tested on single-SIM devices (such as Google Pixel series), it is quite worthless as the purpose of this API here is to find the SIM-card slot index, and for all of them it's the only one anyway.
- Xiaomi Redmi 8 with Android 10 .
- Vivo V23 5G with Android 12 .
So, so far the only one I have in the office that shows this issue (users have this too) is "Honor Magic4 pro" with Android 12.
While this can be tested on single-SIM devices (such as Google Pixel series), it is quite worthless as the purpose of this API here is to find the SIM-card slot index, and for all of them it's the only one anyway.
vi...@google.com <vi...@google.com> #8
Thanks for the information, We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
lb...@gmail.com <lb...@gmail.com> #9
@8 Thank you. Again, note that this occurs on some devices, and not on others.
vi...@google.com <vi...@google.com> #11
The development team has fixed the issue and it will be available in a future build.
lb...@gmail.com <lb...@gmail.com> #12
@11 Fixed how?
Is it more reliable on Android 14?
How does it work?
Is there a workaround for older versions? A compat library solution?
Please explain...
Is it more reliable on Android 14?
How does it work?
Is there a workaround for older versions? A compat library solution?
Please explain...
Description
- Steps to reproduce the problem (including sample code if appropriate).
Query the call log, and try to find for each call, which SIM card slot ID is used, by getting the value of CallLog.Calls.PHONE_ACCOUNT_ID from the cursor, and then this:
val telecomManager = context.getSystemService<TelecomManager>()
telecomManager.callCapablePhoneAccounts.forEachIndexed { index, account: PhoneAccountHandle ->
val phoneAccount: PhoneAccount = telecomManager.getPhoneAccount(account)
val accountId: String = phoneAccount.accountHandle
.id
if (accountIdToFind == accountId) {
return index
}
}
- What happened.
On the problematic devices, instead of a real accountID, you will just get 0 or 1 (the index of the SIM card slot), so this won't work.
- What you think the correct behavior should be.
Should be according to the docs:
- Is this a security related issue? Yes/No
No
An easy way to check it, is via the project of "Simple Dialer", in "RecentsHelper" class, on the line of finding the simID out of accountIdToSimIDMap, based on accountId :
Please add some tests for licensing on the Play Store to ensure this will be consistent with official API.
According to code I've found online, it seems this issue exists on many other devices.