use of com.vonglasow.michael.satstat.data.CellTowerLte in project satstat by mvglasow.
the class RadioSectionFragment method showCells.
/**
* Updates the list of cells in range.
* <p>
* This method is automatically called by
* {@link PhoneStateListener#onCellInfoChanged(List)}
* and {@link PhoneStateListener.onCellLocationChanged}. It must be called
* manually whenever {@link #mCellsCdma}, {@link #mCellsGsm},
* {@link #mCellsLte} or one of their values are modified, typically after
* calling {@link android.telephony.TelephonyManager#getAllCellInfo()},
* {@link android.telephony.TelephonyManager#getCellLocation()} or
* {@link android.telephony.TelephonyManager#getNeighboringCellInfo()}.
*/
protected void showCells() {
int cdmaVisibility = View.GONE;
int gsmVisibility = View.GONE;
int lteVisibility = View.GONE;
rilCells.removeAllViews();
if (mCellsGsm.containsValue(mServingCell)) {
showCellGsm((CellTowerGsm) mServingCell);
gsmVisibility = View.VISIBLE;
}
for (CellTowerGsm cell : mCellsGsm.getAll()) if (cell.hasSource() && (cell != mServingCell)) {
showCellGsm(cell);
gsmVisibility = View.VISIBLE;
}
rilGsmLayout.setVisibility(gsmVisibility);
rilCdmaCells.removeAllViews();
if (mCellsCdma.containsValue(mServingCell)) {
showCellCdma((CellTowerCdma) mServingCell);
cdmaVisibility = View.VISIBLE;
}
for (CellTowerCdma cell : mCellsCdma.getAll()) if (cell.hasSource() && (cell != mServingCell)) {
showCellCdma(cell);
cdmaVisibility = View.VISIBLE;
}
rilCdmaLayout.setVisibility(cdmaVisibility);
rilLteCells.removeAllViews();
if (mCellsLte.containsValue(mServingCell)) {
showCellLte((CellTowerLte) mServingCell);
lteVisibility = View.VISIBLE;
}
for (CellTowerLte cell : mCellsLte.getAll()) if (cell.hasSource() && (cell != mServingCell)) {
showCellLte(cell);
lteVisibility = View.VISIBLE;
}
rilLteLayout.setVisibility(lteVisibility);
}
Aggregations