Implement ConnectivityStateMetrics sample
Test: ConnectivitySampleMetricsTest Change-Id: I0afdda023208c3f8620cb5b89add66448af596d7
This commit is contained in:
@@ -259,6 +259,19 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
*/
|
||||
private int mEnterpriseId;
|
||||
|
||||
/**
|
||||
* Gets the enterprise IDs as an int. Internal callers only.
|
||||
*
|
||||
* DO NOT USE THIS if not immediately collapsing back into a scalar. Instead,
|
||||
* prefer getEnterpriseIds/hasEnterpriseId.
|
||||
*
|
||||
* @return the internal, version-dependent int representing enterprise ids
|
||||
* @hide
|
||||
*/
|
||||
public int getEnterpriseIdsInternal() {
|
||||
return mEnterpriseId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get enteprise identifiers set.
|
||||
*
|
||||
@@ -741,8 +754,10 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
|
||||
/**
|
||||
* Capabilities that are managed by ConnectivityService.
|
||||
* @hide
|
||||
*/
|
||||
private static final long CONNECTIVITY_MANAGED_CAPABILITIES =
|
||||
@VisibleForTesting
|
||||
public static final long CONNECTIVITY_MANAGED_CAPABILITIES =
|
||||
BitUtils.packBitList(
|
||||
NET_CAPABILITY_VALIDATED,
|
||||
NET_CAPABILITY_CAPTIVE_PORTAL,
|
||||
@@ -858,6 +873,19 @@ public final class NetworkCapabilities implements Parcelable {
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the capabilities as an int. Internal callers only.
|
||||
*
|
||||
* DO NOT USE THIS if not immediately collapsing back into a scalar. Instead,
|
||||
* prefer getCapabilities/hasCapability.
|
||||
*
|
||||
* @return an internal, version-dependent int representing the capabilities
|
||||
* @hide
|
||||
*/
|
||||
public long getCapabilitiesInternal() {
|
||||
return mNetworkCapabilities;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets all the capabilities set on this {@code NetworkCapability} instance.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user