java类android.telephony.CellSignalStrength的实例源码

CellInfoUtil.java 文件源码 项目:proto-collecte 阅读 32 收藏 0 点赞 0 评论 0
private static CommonCellInfo toCellularInfo(CellInfoLte cellInfo) {

        CommonCellInfo res = new CommonCellInfo();
        CellIdentityLte identityLte = cellInfo.getCellIdentity();
        CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();

        res.setType(LTE);

        res.setCid(identityLte.getCi());
        res.setLac(identityLte.getTac());
        res.setMcc(identityLte.getMcc());
        res.setMnc(identityLte.getMnc());
        res.setDbm(valdiateDbm(signalStrength.getDbm()));
        res.setLevel(signalStrength.getLevel());
        return res;
    }
CellInfoUtil.java 文件源码 项目:proto-collecte 阅读 27 收藏 0 点赞 0 评论 0
private static CommonCellInfo toCellularInfo(CellInfoGsm cellInfo) {

        CommonCellInfo res = new CommonCellInfo();
        CellIdentityGsm identityGsm = cellInfo.getCellIdentity();
        CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();

        res.setType(GSM);

        res.setCid(identityGsm.getCid());
        res.setLac(identityGsm.getLac());
        res.setMcc(identityGsm.getMcc());
        res.setMnc(identityGsm.getMnc());
        res.setDbm(valdiateDbm(signalStrength.getDbm()));
        res.setLevel(signalStrength.getLevel());
        return res;
    }
CellInfoUtil.java 文件源码 项目:proto-collecte 阅读 28 收藏 0 点赞 0 评论 0
private static CommonCellInfo toCellularInfo(CellInfoWcdma cellInfo) {
    CommonCellInfo res = new CommonCellInfo();
    CellIdentityWcdma identityWcdma = cellInfo.getCellIdentity();
    CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();

    res.setType(WCDMA);

    res.setCid(identityWcdma.getCid());
    res.setLac(identityWcdma.getLac());
    res.setMcc(identityWcdma.getMcc());
    res.setMnc(identityWcdma.getMnc());
    res.setDbm(valdiateDbm(signalStrength.getDbm()));
    res.setLevel(signalStrength.getLevel());
    return res;
}
CellInfoUtil.java 文件源码 项目:proto-collecte 阅读 24 收藏 0 点赞 0 评论 0
private static CommonCellInfo toCellularInfo(CellInfoCdma cellInfo) {

        CommonCellInfo res = new CommonCellInfo();
        CellIdentityCdma identityCdma = cellInfo.getCellIdentity();
        CellSignalStrength signalStrength = cellInfo.getCellSignalStrength();

        return res;
    }


问题


面经


文章

微信
公众号

扫码关注公众号