From 216378b69087cc50bb0408dfd7788618e1cf3e26 Mon Sep 17 00:00:00 2001 From: Chen Xu Date: Fri, 3 Dec 2021 15:38:03 -0800 Subject: [PATCH] correct the public doc of setSimSlotMapping 1. the assignment doesn't align with the description 2. the order of parameters are wrong Bug: 206718882 Test: Build Change-Id: Ia129e39d60bca6a611bf773a5493c99e2bf2b0bb --- .../java/android/telephony/TelephonyManager.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/telephony/java/android/telephony/TelephonyManager.java b/telephony/java/android/telephony/TelephonyManager.java index ae2facda70cbe..178ede36ec303 100644 --- a/telephony/java/android/telephony/TelephonyManager.java +++ b/telephony/java/android/telephony/TelephonyManager.java @@ -4142,28 +4142,28 @@ public class TelephonyManager { * 0) or * second physical slot(value 1), port (index 0), while the other physical slot remains unmapped * and inactive. - * slotMapping[0] = UiccSlotMapping{0 //logical slot, 0 //physical slot//, 0 //port//} - * slotMapping[0] = UiccSlotMapping{1 // logical slot, 1 //physical slot//, 0 //port//} + * slotMapping[0] = UiccSlotMapping{0 //port index, 0 //physical slot, 0 //logical slot} or + * slotMapping[0] = UiccSlotMapping{0 //port index, 1 //physical slot, 0 //logical slot} * * Example no. of logical slots 2 and physical slots 2 supports MEP with 2 ports available: * Each logical slot must be mapped to a port (physical slot and port combination). * First logical slot (index 0) can be mapped to physical slot 1 and the second logical slot * can be mapped to either port from physical slot 2. * - * slotMapping[0] = UiccSlotMapping{0, 0, 0} and slotMapping[1] = UiccSlotMapping{1, 0, 0} or + * slotMapping[0] = UiccSlotMapping{0, 0, 0} and slotMapping[1] = UiccSlotMapping{0, 1, 1} or * slotMapping[0] = UiccSlotMapping{0, 0, 0} and slotMapping[1] = UiccSlotMapping{1, 1, 1} * * or the other way around, the second logical slot(index 1) can be mapped to physical slot 1 * and the first logical slot can be mapped to either port from physical slot 2. * - * slotMapping[1] = UiccSlotMapping{0, 0, 0} and slotMapping[0] = UiccSlotMapping{1, 0, 0} or + * slotMapping[1] = UiccSlotMapping{0, 0, 0} and slotMapping[0] = UiccSlotMapping{0, 1, 1} or * slotMapping[1] = UiccSlotMapping{0, 0, 0} and slotMapping[0] = UiccSlotMapping{1, 1, 1} * * another possible mapping is each logical slot maps to each port of physical slot 2 and there * is no active logical modem mapped to physical slot 1. * - * slotMapping[0] = UiccSlotMapping{1, 0, 0} and slotMapping[1] = UiccSlotMapping{1, 1, 1} or - * slotMapping[0] = UiccSlotMapping{1, 1, 1} and slotMapping[1] = UiccSlotMapping{1, 0, 0} + * slotMapping[0] = UiccSlotMapping{0, 1, 0} and slotMapping[1] = UiccSlotMapping{1, 1, 1} or + * slotMapping[0] = UiccSlotMapping{1, 1, 0} and slotMapping[1] = UiccSlotMapping{0, 1, 1} * * @param slotMapping Logical to physical slot and port mapping. * @throws IllegalStateException if telephony service is null or slot mapping was sent when the @@ -4240,7 +4240,7 @@ public class TelephonyManager { @RequiresPermission(android.Manifest.permission.READ_PRIVILEGED_PHONE_STATE) @NonNull public Collection getSimSlotMapping() { - List slotMap = new ArrayList<>(); + List slotMap; try { ITelephony telephony = getITelephony(); if (telephony != null) {