Merge pull request #431 from Naveen3Singh/sim_selection

Respect default SMS SIM setting
This commit is contained in:
Tibor Kaputa 2022-09-20 09:57:55 +02:00 committed by GitHub
commit b5c6ec5952
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 51 additions and 16 deletions

View file

@ -26,7 +26,7 @@ class DirectReplyReceiver : BroadcastReceiver() {
val settings = context.getSendMessageSettings()
if (address != null) {
val availableSIMs = SubscriptionManager.from(context).activeSubscriptionInfoList
val availableSIMs = context.subscriptionManagerCompat().activeSubscriptionInfoList
if ((availableSIMs?.size ?: 0) > 1) {
val currentSIMCardIndex = context.config.getUseSIMIdAtNumber(address)
val wantedId = availableSIMs.getOrNull(currentSIMCardIndex)