Search in sources :

Example 1 with CellSignalStrengthCdma

use of android.telephony.CellSignalStrengthCdma in project android_packages_apps_Settings by LineageOS.

the class RadioInfo method buildCdmaInfoString.

private final String buildCdmaInfoString(CellInfoCdma ci) {
    CellIdentityCdma cidCdma = ci.getCellIdentity();
    CellSignalStrengthCdma ssCdma = ci.getCellSignalStrength();
    return String.format("%-3.3s %-5.5s %-5.5s %-5.5s %-6.6s %-6.6s %-6.6s %-6.6s %-5.5s", ci.isRegistered() ? "S  " : "   ", getCellInfoDisplayString(cidCdma.getSystemId()), getCellInfoDisplayString(cidCdma.getNetworkId()), getCellInfoDisplayString(cidCdma.getBasestationId()), getCellInfoDisplayString(ssCdma.getCdmaDbm()), getCellInfoDisplayString(ssCdma.getCdmaEcio()), getCellInfoDisplayString(ssCdma.getEvdoDbm()), getCellInfoDisplayString(ssCdma.getEvdoEcio()), getCellInfoDisplayString(ssCdma.getEvdoSnr()));
}
Also used : CellIdentityCdma(android.telephony.CellIdentityCdma) CellSignalStrengthCdma(android.telephony.CellSignalStrengthCdma)

Example 2 with CellSignalStrengthCdma

use of android.telephony.CellSignalStrengthCdma in project android_packages_apps_Settings by SudaMod.

the class RadioInfo method buildCdmaInfoString.

private final String buildCdmaInfoString(CellInfoCdma ci) {
    CellIdentityCdma cidCdma = ci.getCellIdentity();
    CellSignalStrengthCdma ssCdma = ci.getCellSignalStrength();
    return String.format("%-3.3s %-5.5s %-5.5s %-5.5s %-6.6s %-6.6s %-6.6s %-6.6s %-5.5s", ci.isRegistered() ? "S  " : "   ", getCellInfoDisplayString(cidCdma.getSystemId()), getCellInfoDisplayString(cidCdma.getNetworkId()), getCellInfoDisplayString(cidCdma.getBasestationId()), getCellInfoDisplayString(ssCdma.getCdmaDbm()), getCellInfoDisplayString(ssCdma.getCdmaEcio()), getCellInfoDisplayString(ssCdma.getEvdoDbm()), getCellInfoDisplayString(ssCdma.getEvdoEcio()), getCellInfoDisplayString(ssCdma.getEvdoSnr()));
}
Also used : CellIdentityCdma(android.telephony.CellIdentityCdma) CellSignalStrengthCdma(android.telephony.CellSignalStrengthCdma)

Example 3 with CellSignalStrengthCdma

use of android.telephony.CellSignalStrengthCdma in project VirtualXposed by android-hacker.

the class MethodProxies method createCellInfo.

private static CellInfo createCellInfo(VCell cell) {
    if (cell.type == 2) {
        // CDMA
        CellInfoCdma cdma = mirror.android.telephony.CellInfoCdma.ctor.newInstance();
        CellIdentityCdma identityCdma = mirror.android.telephony.CellInfoCdma.mCellIdentityCdma.get(cdma);
        CellSignalStrengthCdma strengthCdma = mirror.android.telephony.CellInfoCdma.mCellSignalStrengthCdma.get(cdma);
        mirror.android.telephony.CellIdentityCdma.mNetworkId.set(identityCdma, cell.networkId);
        mirror.android.telephony.CellIdentityCdma.mSystemId.set(identityCdma, cell.systemId);
        mirror.android.telephony.CellIdentityCdma.mBasestationId.set(identityCdma, cell.baseStationId);
        mirror.android.telephony.CellSignalStrengthCdma.mCdmaDbm.set(strengthCdma, -74);
        mirror.android.telephony.CellSignalStrengthCdma.mCdmaEcio.set(strengthCdma, -91);
        mirror.android.telephony.CellSignalStrengthCdma.mEvdoDbm.set(strengthCdma, -64);
        mirror.android.telephony.CellSignalStrengthCdma.mEvdoSnr.set(strengthCdma, 7);
        return cdma;
    } else {
        // GSM
        CellInfoGsm gsm = mirror.android.telephony.CellInfoGsm.ctor.newInstance();
        CellIdentityGsm identityGsm = mirror.android.telephony.CellInfoGsm.mCellIdentityGsm.get(gsm);
        CellSignalStrengthGsm strengthGsm = mirror.android.telephony.CellInfoGsm.mCellSignalStrengthGsm.get(gsm);
        mirror.android.telephony.CellIdentityGsm.mMcc.set(identityGsm, cell.mcc);
        mirror.android.telephony.CellIdentityGsm.mMnc.set(identityGsm, cell.mnc);
        mirror.android.telephony.CellIdentityGsm.mLac.set(identityGsm, cell.lac);
        mirror.android.telephony.CellIdentityGsm.mCid.set(identityGsm, cell.cid);
        mirror.android.telephony.CellSignalStrengthGsm.mSignalStrength.set(strengthGsm, 20);
        mirror.android.telephony.CellSignalStrengthGsm.mBitErrorRate.set(strengthGsm, 0);
        return gsm;
    }
}
Also used : CellIdentityCdma(android.telephony.CellIdentityCdma) CellInfoCdma(android.telephony.CellInfoCdma) CellSignalStrengthGsm(android.telephony.CellSignalStrengthGsm) CellIdentityGsm(android.telephony.CellIdentityGsm) CellSignalStrengthCdma(android.telephony.CellSignalStrengthCdma) CellInfoGsm(android.telephony.CellInfoGsm)

Example 4 with CellSignalStrengthCdma

use of android.telephony.CellSignalStrengthCdma in project android_packages_apps_Settings by DirtyUnicorns.

the class RadioInfo method buildCdmaInfoString.

private final String buildCdmaInfoString(CellInfoCdma ci) {
    CellIdentityCdma cidCdma = ci.getCellIdentity();
    CellSignalStrengthCdma ssCdma = ci.getCellSignalStrength();
    return String.format("%-3.3s %-5.5s %-5.5s %-5.5s %-6.6s %-6.6s %-6.6s %-6.6s %-5.5s", ci.isRegistered() ? "S  " : "   ", getCellInfoDisplayString(cidCdma.getSystemId()), getCellInfoDisplayString(cidCdma.getNetworkId()), getCellInfoDisplayString(cidCdma.getBasestationId()), getCellInfoDisplayString(ssCdma.getCdmaDbm()), getCellInfoDisplayString(ssCdma.getCdmaEcio()), getCellInfoDisplayString(ssCdma.getEvdoDbm()), getCellInfoDisplayString(ssCdma.getEvdoEcio()), getCellInfoDisplayString(ssCdma.getEvdoSnr()));
}
Also used : CellIdentityCdma(android.telephony.CellIdentityCdma) CellSignalStrengthCdma(android.telephony.CellSignalStrengthCdma)

Example 5 with CellSignalStrengthCdma

use of android.telephony.CellSignalStrengthCdma in project UnityModManager by xausky.

the class MethodProxies method createCellInfo.

private static CellInfo createCellInfo(VCell cell) {
    if (cell.type == 2) {
        // CDMA
        CellInfoCdma cdma = mirror.android.telephony.CellInfoCdma.ctor.newInstance();
        CellIdentityCdma identityCdma = mirror.android.telephony.CellInfoCdma.mCellIdentityCdma.get(cdma);
        CellSignalStrengthCdma strengthCdma = mirror.android.telephony.CellInfoCdma.mCellSignalStrengthCdma.get(cdma);
        mirror.android.telephony.CellIdentityCdma.mNetworkId.set(identityCdma, cell.networkId);
        mirror.android.telephony.CellIdentityCdma.mSystemId.set(identityCdma, cell.systemId);
        mirror.android.telephony.CellIdentityCdma.mBasestationId.set(identityCdma, cell.baseStationId);
        mirror.android.telephony.CellSignalStrengthCdma.mCdmaDbm.set(strengthCdma, -74);
        mirror.android.telephony.CellSignalStrengthCdma.mCdmaEcio.set(strengthCdma, -91);
        mirror.android.telephony.CellSignalStrengthCdma.mEvdoDbm.set(strengthCdma, -64);
        mirror.android.telephony.CellSignalStrengthCdma.mEvdoSnr.set(strengthCdma, 7);
        return cdma;
    } else {
        // GSM
        CellInfoGsm gsm = mirror.android.telephony.CellInfoGsm.ctor.newInstance();
        CellIdentityGsm identityGsm = mirror.android.telephony.CellInfoGsm.mCellIdentityGsm.get(gsm);
        CellSignalStrengthGsm strengthGsm = mirror.android.telephony.CellInfoGsm.mCellSignalStrengthGsm.get(gsm);
        mirror.android.telephony.CellIdentityGsm.mMcc.set(identityGsm, cell.mcc);
        mirror.android.telephony.CellIdentityGsm.mMnc.set(identityGsm, cell.mnc);
        mirror.android.telephony.CellIdentityGsm.mLac.set(identityGsm, cell.lac);
        mirror.android.telephony.CellIdentityGsm.mCid.set(identityGsm, cell.cid);
        mirror.android.telephony.CellSignalStrengthGsm.mSignalStrength.set(strengthGsm, 20);
        mirror.android.telephony.CellSignalStrengthGsm.mBitErrorRate.set(strengthGsm, 0);
        return gsm;
    }
}
Also used : CellIdentityCdma(android.telephony.CellIdentityCdma) CellInfoCdma(android.telephony.CellInfoCdma) CellSignalStrengthGsm(android.telephony.CellSignalStrengthGsm) CellIdentityGsm(android.telephony.CellIdentityGsm) CellSignalStrengthCdma(android.telephony.CellSignalStrengthCdma) CellInfoGsm(android.telephony.CellInfoGsm)

Aggregations

CellSignalStrengthCdma (android.telephony.CellSignalStrengthCdma)14 CellIdentityCdma (android.telephony.CellIdentityCdma)13 CellIdentityGsm (android.telephony.CellIdentityGsm)6 CellInfoCdma (android.telephony.CellInfoCdma)6 CellInfoGsm (android.telephony.CellInfoGsm)6 CellSignalStrengthGsm (android.telephony.CellSignalStrengthGsm)6 CellIdentityLte (android.telephony.CellIdentityLte)3 CellIdentityWcdma (android.telephony.CellIdentityWcdma)3 CellInfo (android.telephony.CellInfo)3 CellInfoLte (android.telephony.CellInfoLte)3 CellInfoWcdma (android.telephony.CellInfoWcdma)3 CellSignalStrengthLte (android.telephony.CellSignalStrengthLte)3 CellSignalStrengthWcdma (android.telephony.CellSignalStrengthWcdma)3 Date (java.util.Date)1