Search in sources :

Example 11 with CdmaCellLocation

use of android.telephony.cdma.CdmaCellLocation in project XobotOS by xamarin.

the class GsmDataConnectionTracker method getCellLocationId.

private int getCellLocationId() {
    int cid = -1;
    CellLocation loc = mPhone.getCellLocation();
    if (loc != null) {
        if (loc instanceof GsmCellLocation) {
            cid = ((GsmCellLocation) loc).getCid();
        } else if (loc instanceof CdmaCellLocation) {
            cid = ((CdmaCellLocation) loc).getBaseStationId();
        }
    }
    return cid;
}
Also used : CdmaCellLocation(android.telephony.cdma.CdmaCellLocation) GsmCellLocation(android.telephony.gsm.GsmCellLocation) CellLocation(android.telephony.CellLocation) CdmaCellLocation(android.telephony.cdma.CdmaCellLocation) GsmCellLocation(android.telephony.gsm.GsmCellLocation)

Example 12 with CdmaCellLocation

use of android.telephony.cdma.CdmaCellLocation in project XobotOS by xamarin.

the class CdmaDataConnectionTracker method writeEventLogCdmaDataDrop.

private void writeEventLogCdmaDataDrop() {
    CdmaCellLocation loc = (CdmaCellLocation) (mPhone.getCellLocation());
    EventLog.writeEvent(EventLogTags.CDMA_DATA_DROP, loc != null ? loc.getBaseStationId() : -1, TelephonyManager.getDefault().getNetworkType());
}
Also used : CdmaCellLocation(android.telephony.cdma.CdmaCellLocation)

Aggregations

CdmaCellLocation (android.telephony.cdma.CdmaCellLocation)12 GsmCellLocation (android.telephony.gsm.GsmCellLocation)7 CellLocation (android.telephony.CellLocation)2 ServiceState (android.telephony.ServiceState)2 TelephonyManager (android.telephony.TelephonyManager)2 Realm (io.realm.Realm)2 Cleanup (lombok.Cleanup)2 SuppressLint (android.annotation.SuppressLint)1 SharedPreferences (android.content.SharedPreferences)1 Resources (android.content.res.Resources)1 GsmDataConnectionTracker (com.android.internal.telephony.gsm.GsmDataConnectionTracker)1 CellInfo (edu.berkeley.cs.amplab.carat.thrift.CellInfo)1 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 UnsupportedEncodingException (java.io.UnsupportedEncodingException)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1