DataStallReport

class DataStallReport : Parcelable
kotlin.Any
   ↳ android.net.ConnectivityDiagnosticsManager.DataStallReport

Class that includes information for a suspected data stall on a specific Network

Summary

Constants
static Int

Indicates that the Data Stall was detected using DNS events.

static Int

Indicates that the Data Stall was detected using TCP metrics.

static String

This key represents the consecutive number of DNS timeouts that have occurred.

static String

This key represents the period in milliseconds over which other included TCP metrics were measured.

static String

This key represents the fail rate of TCP packets when the suspected data stall was detected.

Inherited constants
Public constructors
DataStallReport(network: Network, reportTimestamp: Long, detectionMethod: Int, linkProperties: LinkProperties, networkCapabilities: NetworkCapabilities, stallDetails: PersistableBundle)

Constructor for DataStallReport.

Public methods
Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Boolean
equals(other: Any?)

Indicates whether some other object is "equal to" this one.

Int

Returns the bitmask of detection methods used to identify this suspected data stall.

LinkProperties

Returns the LinkProperties available when this report was taken.

Network

Returns the Network for this DataStallReport.

NetworkCapabilities

Returns the NetworkCapabilities when this report was taken.

Long

Returns the epoch timestamp (milliseconds) for when this report was taken.

PersistableBundle

Returns a PersistableBundle with additional info for this report.

Int

Unit
writeToParcel(dest: Parcel, flags: Int)

Flatten this object in to a Parcel.

Properties
static Parcelable.Creator<ConnectivityDiagnosticsManager.DataStallReport!>

Implement the Parcelable interface

Constants

DETECTION_METHOD_DNS_EVENTS

static val DETECTION_METHOD_DNS_EVENTS: Int

Indicates that the Data Stall was detected using DNS events.

Value: 1

DETECTION_METHOD_TCP_METRICS

static val DETECTION_METHOD_TCP_METRICS: Int

Indicates that the Data Stall was detected using TCP metrics.

Value: 2

KEY_DNS_CONSECUTIVE_TIMEOUTS

static val KEY_DNS_CONSECUTIVE_TIMEOUTS: String

This key represents the consecutive number of DNS timeouts that have occurred.

The consecutive count will be reset any time a DNS response is received.

This key will be included if the data stall detection method is DETECTION_METHOD_DNS_EVENTS.

This value is an int.

Value: "dnsConsecutiveTimeouts"

KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS

static val KEY_TCP_METRICS_COLLECTION_PERIOD_MILLIS: String

This key represents the period in milliseconds over which other included TCP metrics were measured.

This key will be included if the data stall detection method is DETECTION_METHOD_TCP_METRICS.

This value is an int.

Value: "tcpMetricsCollectionPeriodMillis"

KEY_TCP_PACKET_FAIL_RATE

static val KEY_TCP_PACKET_FAIL_RATE: String

This key represents the fail rate of TCP packets when the suspected data stall was detected.

This key will be included if the data stall detection method is DETECTION_METHOD_TCP_METRICS.

This value is an int percentage between 0 and 100.

Value: "tcpPacketFailRate"

Public constructors

DataStallReport

DataStallReport(
    network: Network,
    reportTimestamp: Long,
    detectionMethod: Int,
    linkProperties: LinkProperties,
    networkCapabilities: NetworkCapabilities,
    stallDetails: PersistableBundle)

Constructor for DataStallReport.

Apps should obtain instances through android.net.ConnectivityDiagnosticsManager.ConnectivityDiagnosticsCallback#onDataStallSuspected instead of instantiating their own instances (unless for testing purposes).

Parameters
network Network: The Network for which this DataStallReport applies This value cannot be null.
reportTimestamp Long: The timestamp for the report
detectionMethod Int: The detection method used to identify this data stall Value is android.net.ConnectivityDiagnosticsManager.DataStallReport#DETECTION_METHOD_DNS_EVENTS, or android.net.ConnectivityDiagnosticsManager.DataStallReport#DETECTION_METHOD_TCP_METRICS
linkProperties LinkProperties: The LinkProperties available on network at reportTimestamp This value cannot be null.
networkCapabilities NetworkCapabilities: The NetworkCapabilities available on network at reportTimestamp This value cannot be null.
stallDetails PersistableBundle: A PersistableBundle that may contain additional info about the report This value cannot be null.

Public methods

describeContents

Added in API level 30
fun describeContents(): Int

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(android.os.Parcel,int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

equals

Added in API level 30
fun equals(other: Any?): Boolean

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

Parameters
obj the reference object with which to compare.
o This value may be null.
Return
Boolean true if this object is the same as the obj argument; false otherwise.

getDetectionMethod

fun getDetectionMethod(): Int

Returns the bitmask of detection methods used to identify this suspected data stall.

Return
Int The bitmask of detection methods used to identify the suspected data stall

getLinkProperties

fun getLinkProperties(): LinkProperties

Returns the LinkProperties available when this report was taken.

Return
LinkProperties LinkProperties available on the Network at the reported timestamp This value cannot be null.

getNetwork

fun getNetwork(): Network

Returns the Network for this DataStallReport.

Return
Network The Network for which this DataStallReport applied This value cannot be null.

getNetworkCapabilities

fun getNetworkCapabilities(): NetworkCapabilities

Returns the NetworkCapabilities when this report was taken.

Return
NetworkCapabilities NetworkCapabilities available on the Network at the reported timestamp This value cannot be null.

getReportTimestamp

fun getReportTimestamp(): Long

Returns the epoch timestamp (milliseconds) for when this report was taken.

Return
Long The timestamp for the report. Taken from System#currentTimeMillis.

getStallDetails

fun getStallDetails(): PersistableBundle

Returns a PersistableBundle with additional info for this report.

Gets a bundle with details about the suspected data stall including information specific to the monitoring method that detected the data stall.

Return
PersistableBundle PersistableBundle that may contain additional information on the suspected data stall This value cannot be null.

hashCode

Added in API level 30
fun hashCode(): Int
Return
Int a hash code value for this object.

writeToParcel

Added in API level 30
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit

Flatten this object in to a Parcel.

Parameters
dest Parcel: This value cannot be null.
flags Int: Additional flags about how the object should be written. May be 0 or PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

static val CREATOR: Parcelable.Creator<ConnectivityDiagnosticsManager.DataStallReport!>

Implement the Parcelable interface