|
|
|
@ -896,6 +896,18 @@ public class MpMasterService extends Service {
|
|
|
|
|
context.startActivity(LaunchIntent);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public int getActiveSlotIndex() {
|
|
|
|
|
Context context = getApplicationContext();
|
|
|
|
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
|
|
|
|
|
|
|
|
|
|
SubscriptionManager subscriptionManager = (SubscriptionManager) getSystemService(Context.TELEPHONY_SUBSCRIPTION_SERVICE);
|
|
|
|
|
int activeSubId = SubscriptionManager.getActiveDataSubscriptionId();
|
|
|
|
|
int activeSlotIdx = SubscriptionManager.getSlotIndex(activeSubId);
|
|
|
|
|
return activeSlotIdx + 1;
|
|
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void selectSimCard(int num) {
|
|
|
|
|
logger.info("Try to Switch To SimCard: " + Integer.toString(num));
|
|
|
|
|
|
|
|
|
|