adding a crashfix at SIM selector

This commit is contained in:
tibbi 2022-07-31 11:29:27 +02:00
parent 2062a58f2f
commit 787e03de2f
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ fun SimpleActivity.launchCreateNewContactIntent() {
fun BaseSimpleActivity.callContactWithSim(recipient: String, useMainSIM: Boolean) {
handlePermission(PERMISSION_READ_PHONE_STATE) {
val wantedSimIndex = if (useMainSIM) 0 else 1
val handle = getAvailableSIMCardLabels().sortedBy { it.id }[wantedSimIndex].handle
val handle = getAvailableSIMCardLabels().sortedBy { it.id }.getOrNull(wantedSimIndex)?.handle
launchCallIntent(recipient, handle)
}
}