CellInformationWrapper.java 文件源码

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

项目:open-rmbt 作者:
public CellInformationWrapper(CellInfo cellInfo) {
    setRegistered(cellInfo.isRegistered());
    this.setTimeStamp(cellInfo.getTimeStamp());

    if (cellInfo.getClass().equals(CellInfoLte.class)) {
        setTechnology(Technology.CONNECTION_4G);
        this.ci = new CellIdentity(((CellInfoLte) cellInfo).getCellIdentity());
        this.cs = new CellSignalStrength(((CellInfoLte) cellInfo).getCellSignalStrength());
    }
    else if (cellInfo.getClass().equals(CellInfoWcdma.class)) {
        setTechnology(Technology.CONNECTION_3G);
        this.ci = new CellIdentity(((CellInfoWcdma) cellInfo).getCellIdentity());
        this.cs = new CellSignalStrength(((CellInfoWcdma) cellInfo).getCellSignalStrength());
    }
    else if (cellInfo.getClass().equals(CellInfoGsm.class)) {
        setTechnology(Technology.CONNECTION_2G);
        this.ci = new CellIdentity(((CellInfoGsm) cellInfo).getCellIdentity());
        this.cs = new CellSignalStrength(((CellInfoGsm) cellInfo).getCellSignalStrength());
    }
    else if (cellInfo.getClass().equals(CellInfoCdma.class)) {
        setTechnology(Technology.CONNECTION_2G);
        this.ci = new CellIdentity(((CellInfoCdma) cellInfo).getCellIdentity());
        this.cs = new CellSignalStrength(((CellInfoCdma) cellInfo).getCellSignalStrength());
    }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号