Loading src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -926,6 +926,7 @@ public class SubscriptionManagerService extends ISub.Stub { mSlotIndexToSubId.remove(simSlotIndex); }); updateGroupDisabled(); logl("markSubscriptionsInactive: " + slotMappingToString()); } /** Loading Loading @@ -1289,6 +1290,7 @@ public class SubscriptionManagerService extends ISub.Stub { mSlotIndexToSubId.put(phoneId, subId); // Update the SIM slot index. This will make the subscription active. mSubscriptionDatabaseManager.setSimSlotIndex(subId, phoneId); logl("updateSubscriptions: " + slotMappingToString()); } // Update the card id. Loading Loading @@ -1365,6 +1367,7 @@ public class SubscriptionManagerService extends ISub.Stub { } else { log("updateSubscriptions: No ICCID available for phone " + phoneId); mSlotIndexToSubId.remove(phoneId); logl("updateSubscriptions: " + slotMappingToString()); } if (areAllSubscriptionsLoaded()) { Loading Loading @@ -1931,6 +1934,7 @@ public class SubscriptionManagerService extends ISub.Stub { int subId = insertSubscriptionInfo(iccId, slotIndex, displayName, subscriptionType); updateGroupDisabled(); mSlotIndexToSubId.put(slotIndex, subId); logl("addSubInfo: " + slotMappingToString()); } else { // Record already exists. loge("Subscription record already existed."); Loading Loading @@ -3828,6 +3832,16 @@ public class SubscriptionManagerService extends ISub.Stub { } } /** * @return The logical SIM slot/sub mapping to string. */ @NonNull private String slotMappingToString() { return mSlotIndexToSubId.entrySet().stream() .map(e -> "Slot " + e.getKey() + ": subId=" + e.getValue()) .collect(Collectors.joining(", ")); } /** * Log debug messages. * Loading Loading @@ -3882,6 +3896,12 @@ public class SubscriptionManagerService extends ISub.Stub { mSlotIndexToSubId.forEach((slotIndex, subId) -> pw.println("Logical SIM slot " + slotIndex + ": subId=" + subId)); pw.decreaseIndent(); pw.println("ICCID:"); pw.increaseIndent(); for (int i = 0; i < mTelephonyManager.getActiveModemCount(); i++) { pw.println("slot " + i + ": " + getIccId(i)); } pw.decreaseIndent(); pw.println(); pw.println("defaultSubId=" + getDefaultSubId()); pw.println("defaultVoiceSubId=" + getDefaultVoiceSubId()); Loading Loading
src/java/com/android/internal/telephony/subscription/SubscriptionManagerService.java +20 −0 Original line number Diff line number Diff line Loading @@ -926,6 +926,7 @@ public class SubscriptionManagerService extends ISub.Stub { mSlotIndexToSubId.remove(simSlotIndex); }); updateGroupDisabled(); logl("markSubscriptionsInactive: " + slotMappingToString()); } /** Loading Loading @@ -1289,6 +1290,7 @@ public class SubscriptionManagerService extends ISub.Stub { mSlotIndexToSubId.put(phoneId, subId); // Update the SIM slot index. This will make the subscription active. mSubscriptionDatabaseManager.setSimSlotIndex(subId, phoneId); logl("updateSubscriptions: " + slotMappingToString()); } // Update the card id. Loading Loading @@ -1365,6 +1367,7 @@ public class SubscriptionManagerService extends ISub.Stub { } else { log("updateSubscriptions: No ICCID available for phone " + phoneId); mSlotIndexToSubId.remove(phoneId); logl("updateSubscriptions: " + slotMappingToString()); } if (areAllSubscriptionsLoaded()) { Loading Loading @@ -1931,6 +1934,7 @@ public class SubscriptionManagerService extends ISub.Stub { int subId = insertSubscriptionInfo(iccId, slotIndex, displayName, subscriptionType); updateGroupDisabled(); mSlotIndexToSubId.put(slotIndex, subId); logl("addSubInfo: " + slotMappingToString()); } else { // Record already exists. loge("Subscription record already existed."); Loading Loading @@ -3828,6 +3832,16 @@ public class SubscriptionManagerService extends ISub.Stub { } } /** * @return The logical SIM slot/sub mapping to string. */ @NonNull private String slotMappingToString() { return mSlotIndexToSubId.entrySet().stream() .map(e -> "Slot " + e.getKey() + ": subId=" + e.getValue()) .collect(Collectors.joining(", ")); } /** * Log debug messages. * Loading Loading @@ -3882,6 +3896,12 @@ public class SubscriptionManagerService extends ISub.Stub { mSlotIndexToSubId.forEach((slotIndex, subId) -> pw.println("Logical SIM slot " + slotIndex + ": subId=" + subId)); pw.decreaseIndent(); pw.println("ICCID:"); pw.increaseIndent(); for (int i = 0; i < mTelephonyManager.getActiveModemCount(); i++) { pw.println("slot " + i + ": " + getIccId(i)); } pw.decreaseIndent(); pw.println(); pw.println("defaultSubId=" + getDefaultSubId()); pw.println("defaultVoiceSubId=" + getDefaultVoiceSubId()); Loading