Use `subscriptionManagerCompat()` everywhere
This commit is contained in:
parent
f4575401f5
commit
a4bd3364c6
|
@ -709,7 +709,7 @@ class ThreadActivity : SimpleActivity() {
|
|||
|
||||
val subscriptionIdToSimId = HashMap<Int, String>()
|
||||
subscriptionIdToSimId[-1] = "?"
|
||||
SubscriptionManager.from(this).activeSubscriptionInfoList?.forEachIndexed { index, subscriptionInfo ->
|
||||
subscriptionManagerCompat().activeSubscriptionInfoList?.forEachIndexed { index, subscriptionInfo ->
|
||||
subscriptionIdToSimId[subscriptionInfo.subscriptionId] = "${index + 1}"
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class ThreadAdapter(
|
|||
private var fontSize = activity.getTextSize()
|
||||
|
||||
@SuppressLint("MissingPermission")
|
||||
private val hasMultipleSIMCards = (SubscriptionManager.from(activity).activeSubscriptionInfoList?.size ?: 0) > 1
|
||||
private val hasMultipleSIMCards = (activity.subscriptionManagerCompat().activeSubscriptionInfoList?.size ?: 0) > 1
|
||||
|
||||
init {
|
||||
setupDragListener(true)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue