Merge "Check if the slot info is null to avoid exception" into sc-qpr1-dev
This commit is contained in:
@@ -3483,7 +3483,8 @@ public class TelephonyManager {
|
|||||||
*/
|
*/
|
||||||
private int getLogicalSlotIndex(int physicalSlotIndex) {
|
private int getLogicalSlotIndex(int physicalSlotIndex) {
|
||||||
UiccSlotInfo[] slotInfos = getUiccSlotsInfo();
|
UiccSlotInfo[] slotInfos = getUiccSlotsInfo();
|
||||||
if (slotInfos != null && physicalSlotIndex >= 0 && physicalSlotIndex < slotInfos.length) {
|
if (slotInfos != null && physicalSlotIndex >= 0 && physicalSlotIndex < slotInfos.length
|
||||||
|
&& slotInfos[physicalSlotIndex] != null) {
|
||||||
return slotInfos[physicalSlotIndex].getLogicalSlotIdx();
|
return slotInfos[physicalSlotIndex].getLogicalSlotIdx();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user