Does anyone know if the cell indexes on the list returned from TelephonyManager.getAllCellInfo()
are related to SIM slot numbers?
I'm using Android API 24...
After experimenting a bit, it seems that running the method updateCellInfo
- described below - always returns a list where it's first index corresponds to device's last SIM slot, and it's last index corresponds to device's first SIM slot.
Can anybody confirm this? Is this correlation plausible?
private ArrayList<CellInfo> updateCellInfo(ArrayList<CellInfo> cellInfo)
{
//Create new ArrayList
ArrayList<CellInfo> cellInfos= new ArrayList<>();
//cellInfo is obtained from telephonyManager.getAllCellInfo()
if(cellInfo.size()!=0)
{
for (int i = 0; i < cellInfo.size(); i++)
{
//Return registered cells only
int index=0;
CellInfo temp=cellInfo.get(i);
if (temp.isRegistered())
{
cellInfos.add(index, temp);
index++;
}
}
}
return cellInfos;
}