FileDocCategorySizeDatePackage
DataConnectionRealTimeInfo.javaAPI DocAndroid 5.1 API3749Thu Mar 12 22:22:42 GMT 2015android.telephony

DataConnectionRealTimeInfo

public class DataConnectionRealTimeInfo extends Object implements android.os.Parcelable
Data connection real time information TODO: How to handle multiple subscriptions?
hide

Fields Summary
private long
mTime
public static int
DC_POWER_STATE_LOW
public static int
DC_POWER_STATE_MEDIUM
public static int
DC_POWER_STATE_HIGH
public static int
DC_POWER_STATE_UNKNOWN
private int
mDcPowerState
public static final Parcelable.Creator
CREATOR
Constructors Summary
public DataConnectionRealTimeInfo(long time, int dcPowerState)
Constructor

hide

      // DC_POWER_STATE_[LOW | MEDIUM | HIGH | UNKNOWN]

           
         
        mTime = time;
        mDcPowerState = dcPowerState;
    
public DataConnectionRealTimeInfo()
Constructor

hide

        mTime = Long.MAX_VALUE;
        mDcPowerState = DC_POWER_STATE_UNKNOWN;
    
private DataConnectionRealTimeInfo(android.os.Parcel in)
Construct a PreciseCallState object from the given parcel.

        mTime = in.readLong();
        mDcPowerState = in.readInt();
    
Methods Summary
public intdescribeContents()

        return 0;
    
public booleanequals(java.lang.Object obj)

        if (this == obj) {
            return true;
        }
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        DataConnectionRealTimeInfo other = (DataConnectionRealTimeInfo) obj;
        return (mTime == other.mTime)
                && (mDcPowerState == other.mDcPowerState);
    
public intgetDcPowerState()

return
DC_POWER_STATE_[LOW | MEDIUM | HIGH | UNKNOWN]

        return mDcPowerState;
    
public longgetTime()

return
time the information was collected or Long.MAX_VALUE if unknown

        return mTime;
    
public inthashCode()


    
       
        final long prime = 17;
        long result = 1;
        result = (prime * result) + mTime;
        result += (prime * result) + mDcPowerState;
        return (int)result;
    
public java.lang.StringtoString()

        StringBuffer sb = new StringBuffer();

        sb.append("mTime=").append(mTime);
        sb.append(" mDcPowerState=").append(mDcPowerState);

        return sb.toString();
    
public voidwriteToParcel(android.os.Parcel out, int flags)

        out.writeLong(mTime);
        out.writeInt(mDcPowerState);