[Settings] 1. Show default subId SIM page if get an intent with invalid
subId 2. Fix the hotswap UI issue Bug: 271635200 Bug: 271347499 Test: local test Change-Id: Iac61a211fce7bcd85da48cb291f46584cf43f5c5
This commit is contained in:
@@ -101,7 +101,9 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl
|
||||
return setSummaryResId(R.string.calls_sms_no_sim);
|
||||
} else {
|
||||
final StringBuilder summary = new StringBuilder();
|
||||
for (SubscriptionInfoEntity subInfo : list) {
|
||||
SubscriptionInfoEntity[] entityArray = list.toArray(
|
||||
new SubscriptionInfoEntity[0]);
|
||||
for (SubscriptionInfoEntity subInfo : entityArray) {
|
||||
int subsSize = list.size();
|
||||
int subId = Integer.parseInt(subInfo.subId);
|
||||
final CharSequence displayName = subInfo.uniqueName;
|
||||
@@ -125,7 +127,7 @@ public class NetworkProviderCallsSmsController extends AbstractPreferenceControl
|
||||
.append(")");
|
||||
}
|
||||
// Do not add ", " for the last subscription.
|
||||
if (!subInfo.equals(list.get(list.size() - 1))) {
|
||||
if (list.size() > 0 && !subInfo.equals(list.get(list.size() - 1))) {
|
||||
summary.append(", ");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user