CellInfoUtil.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:proto-collecte 作者:
public ArrayList<CommonCellInfo> toCellularInfo(List<CellInfo> cellInfoList) {
    final ArrayList<CommonCellInfo> res = new ArrayList<CommonCellInfo>();
    if (cellInfoList == null) {
        return res;
    }

    for (CellInfo cellInfo : cellInfoList) {
        if (!cellInfo.isRegistered()) {
            continue;
        }
        //Wcdma : Wideband Code Division Multiple Access : multiplexage par code à large bande
        if (cellInfo instanceof CellInfoWcdma) {
            CellInfoWcdma cellInfoWcdma = (CellInfoWcdma) cellInfo;
            res.add(toCellularInfo(cellInfoWcdma));
        }

        if (cellInfo instanceof CellInfoGsm) {
            final CellInfoGsm cellInfoGsm = (CellInfoGsm) cellInfo;
            res.add(toCellularInfo(cellInfoGsm));
        }

        if (cellInfo instanceof CellInfoLte) {
            final CellInfoLte cellInfoLte = (CellInfoLte) cellInfo;
            res.add(toCellularInfo(cellInfoLte));
        }

        // TODO: gérer CDMA
    }
    return res;
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号