Update NetworkAgentConfig API for council comments
Bug: 152238712 Test: FrameworksNetTests NetworkStackTests Change-Id: Idca9f243a5c955f4caa30921ee520e1a93b0d11a
This commit is contained in:
@@ -705,6 +705,36 @@ public class ConnectivityManager {
|
|||||||
@Deprecated
|
@Deprecated
|
||||||
public static final int TYPE_TEST = 18; // TODO: Remove this once NetworkTypes are unused.
|
public static final int TYPE_TEST = 18; // TODO: Remove this once NetworkTypes are unused.
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @deprecated Use {@link NetworkCapabilities} instead.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@Deprecated
|
||||||
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
|
@IntDef(prefix = { "TYPE_" }, value = {
|
||||||
|
TYPE_NONE,
|
||||||
|
TYPE_MOBILE,
|
||||||
|
TYPE_WIFI,
|
||||||
|
TYPE_MOBILE_MMS,
|
||||||
|
TYPE_MOBILE_SUPL,
|
||||||
|
TYPE_MOBILE_DUN,
|
||||||
|
TYPE_MOBILE_HIPRI,
|
||||||
|
TYPE_WIMAX,
|
||||||
|
TYPE_BLUETOOTH,
|
||||||
|
TYPE_DUMMY,
|
||||||
|
TYPE_ETHERNET,
|
||||||
|
TYPE_MOBILE_FOTA,
|
||||||
|
TYPE_MOBILE_IMS,
|
||||||
|
TYPE_MOBILE_CBS,
|
||||||
|
TYPE_WIFI_P2P,
|
||||||
|
TYPE_MOBILE_IA,
|
||||||
|
TYPE_MOBILE_EMERGENCY,
|
||||||
|
TYPE_PROXY,
|
||||||
|
TYPE_VPN,
|
||||||
|
TYPE_TEST
|
||||||
|
})
|
||||||
|
public @interface LegacyNetworkType {}
|
||||||
|
|
||||||
// Deprecated constants for return values of startUsingNetworkFeature. They used to live
|
// Deprecated constants for return values of startUsingNetworkFeature. They used to live
|
||||||
// in com.android.internal.telephony.PhoneConstants until they were made inaccessible.
|
// in com.android.internal.telephony.PhoneConstants until they were made inaccessible.
|
||||||
private static final int DEPRECATED_PHONE_CONSTANT_APN_ALREADY_ACTIVE = 0;
|
private static final int DEPRECATED_PHONE_CONSTANT_APN_ALREADY_ACTIVE = 0;
|
||||||
|
|||||||
@@ -155,6 +155,7 @@ public final class NetworkAgentConfig implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* @return the legacy type
|
* @return the legacy type
|
||||||
*/
|
*/
|
||||||
|
@ConnectivityManager.LegacyNetworkType
|
||||||
public int getLegacyType() {
|
public int getLegacyType() {
|
||||||
return legacyType;
|
return legacyType;
|
||||||
}
|
}
|
||||||
@@ -206,7 +207,7 @@ public final class NetworkAgentConfig implements Parcelable {
|
|||||||
/**
|
/**
|
||||||
* Builder class to facilitate constructing {@link NetworkAgentConfig} objects.
|
* Builder class to facilitate constructing {@link NetworkAgentConfig} objects.
|
||||||
*/
|
*/
|
||||||
public static class Builder {
|
public static final class Builder {
|
||||||
private final NetworkAgentConfig mConfig = new NetworkAgentConfig();
|
private final NetworkAgentConfig mConfig = new NetworkAgentConfig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user