public class LinkQualityInfo extends Object implements Parcelable
android.net.#WifiLinkQualityInfo
or android.net.#MobileLinkQualityInfo
which provide additional
information.Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<LinkQualityInfo> |
CREATOR |
static int |
NORMALIZED_MAX_SIGNAL_STRENGTH |
static int |
NORMALIZED_MIN_SIGNAL_STRENGTH |
static int |
NORMALIZED_SIGNAL_STRENGTH_RANGE |
protected static int |
OBJECT_TYPE_LINK_QUALITY_INFO
Implement the Parcelable interface.
|
protected static int |
OBJECT_TYPE_MOBILE_LINK_QUALITY_INFO |
protected static int |
OBJECT_TYPE_WIFI_LINK_QUALITY_INFO |
static int |
UNKNOWN_INT
Represents a value that you can use to test if an integer field is set to a good value
|
static long |
UNKNOWN_LONG
Represents a value that you can use to test if a long field is set to a good value
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
LinkQualityInfo() |
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Implement the Parcelable interface
|
int |
getDataSampleDuration()
returns the sample duration used
|
long |
getLastDataSampleTime()
returns the time stamp of the last sample
|
int |
getNetworkType()
returns the type of network this link is connected to
|
int |
getNormalizedSignalStrength()
returns the signal strength normalized across multiple types of networks
|
long |
getPacketCount()
returns the total number of packets sent or received in sample duration
|
long |
getPacketErrorCount()
returns the total number of packets errors encountered in sample duration
|
int |
getTheoreticalLatency()
returns the theoretical latency of this network
|
int |
getTheoreticalRxBandwidth()
returns the theoretical download bandwidth of this network
|
int |
getTheoreticalTxBandwidth()
returns the theoretical upload bandwidth of this network
|
protected void |
initializeFromParcel(Parcel in) |
void |
setDataSampleDuration(int dataSampleDuration) |
void |
setLastDataSampleTime(long lastDataSampleTime) |
void |
setNetworkType(int networkType) |
void |
setNormalizedSignalStrength(int normalizedSignalStrength) |
void |
setPacketCount(long packetCount) |
void |
setPacketErrorCount(long packetErrorCount) |
void |
setTheoreticalLatency(int theoreticalLatency) |
void |
setTheoreticalRxBandwidth(int theoreticalRxBandwidth) |
void |
setTheoreticalTxBandwidth(int theoreticalTxBandwidth) |
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
void |
writeToParcel(Parcel dest,
int flags,
int objectType) |
public static final int UNKNOWN_INT
public static final long UNKNOWN_LONG
public static final int NORMALIZED_MIN_SIGNAL_STRENGTH
public static final int NORMALIZED_MAX_SIGNAL_STRENGTH
public static final int NORMALIZED_SIGNAL_STRENGTH_RANGE
protected static final int OBJECT_TYPE_LINK_QUALITY_INFO
protected static final int OBJECT_TYPE_WIFI_LINK_QUALITY_INFO
protected static final int OBJECT_TYPE_MOBILE_LINK_QUALITY_INFO
public static final Parcelable.Creator<LinkQualityInfo> CREATOR
public int describeContents()
describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.public void writeToParcel(Parcel dest, int flags, int objectType)
protected void initializeFromParcel(Parcel in)
public int getNetworkType()
ConnectivityManager
or
UNKNOWN_INT
public void setNetworkType(int networkType)
public int getNormalizedSignalStrength()
UNKNOWN_INT
public void setNormalizedSignalStrength(int normalizedSignalStrength)
public long getPacketCount()
UNKNOWN_LONG
public void setPacketCount(long packetCount)
public long getPacketErrorCount()
UNKNOWN_LONG
public void setPacketErrorCount(long packetErrorCount)
public int getTheoreticalTxBandwidth()
UNKNOWN_INT
public void setTheoreticalTxBandwidth(int theoreticalTxBandwidth)
public int getTheoreticalRxBandwidth()
UNKNOWN_INT
public void setTheoreticalRxBandwidth(int theoreticalRxBandwidth)
public int getTheoreticalLatency()
UNKNOWN_INT
public void setTheoreticalLatency(int theoreticalLatency)
public long getLastDataSampleTime()
UNKNOWN_LONG
public void setLastDataSampleTime(long lastDataSampleTime)
public int getDataSampleDuration()
UNKNOWN_INT
public void setDataSampleDuration(int dataSampleDuration)