Add getSubscriptionId API

The old getSubId or getSubscriptionIds return multiple sub ids
per slot index, which is not possible in today's implementation
because the slot index here refers to the logical slot index,
which is also known as phone id, or the logical modem index. In
today's telephony, one logical phone can only have one
subscription at one time, so does the modem.

Bug: 239607619
Test: Manual
Merged-In: I0a43d33daf523e6f0bea054c8965281bafbbcaa4
Change-Id: I0a43d33daf523e6f0bea054c8965281bafbbcaa4
This commit is contained in:
Jack Yu
2022-11-19 22:28:47 -08:00
parent 839c6e88b4
commit bc71ee5ece

View File

@@ -57,10 +57,6 @@ public class DisableSmartForwardingTask implements Runnable {
}
private int getSubId(int slotIndex) {
int[] subId = SubscriptionManager.getSubId(slotIndex);
if (subId != null && subId.length > 0) {
return subId[0];
}
return SubscriptionManager.INVALID_SUBSCRIPTION_ID;
return SubscriptionManager.getSubscriptionId(slotIndex);
}
}