Expose BIP and VSIM relavent definitions
In order to support special APNs below, OEM may need extra NetworkCapabilities and apn type definition to support the carriers request. Add corresponding definition into API surface. VSIM: for Virtual SIM service BIP: for Bearer Independent Protocol Bug: 130869457 Test: make update-api Change-Id: I41e881c6fe39e92d5cdac2d0a02fa8a8e814c9c5
This commit is contained in:
@@ -42857,6 +42857,7 @@ package android.telephony.data {
|
|||||||
field public static final int PROTOCOL_NON_IP = 4; // 0x4
|
field public static final int PROTOCOL_NON_IP = 4; // 0x4
|
||||||
field public static final int PROTOCOL_PPP = 3; // 0x3
|
field public static final int PROTOCOL_PPP = 3; // 0x3
|
||||||
field public static final int PROTOCOL_UNSTRUCTURED = 5; // 0x5
|
field public static final int PROTOCOL_UNSTRUCTURED = 5; // 0x5
|
||||||
|
field public static final int TYPE_BIP = 8192; // 0x2000
|
||||||
field public static final int TYPE_CBS = 128; // 0x80
|
field public static final int TYPE_CBS = 128; // 0x80
|
||||||
field public static final int TYPE_DEFAULT = 17; // 0x11
|
field public static final int TYPE_DEFAULT = 17; // 0x11
|
||||||
field public static final int TYPE_DUN = 8; // 0x8
|
field public static final int TYPE_DUN = 8; // 0x8
|
||||||
@@ -42868,6 +42869,7 @@ package android.telephony.data {
|
|||||||
field public static final int TYPE_MCX = 1024; // 0x400
|
field public static final int TYPE_MCX = 1024; // 0x400
|
||||||
field public static final int TYPE_MMS = 2; // 0x2
|
field public static final int TYPE_MMS = 2; // 0x2
|
||||||
field public static final int TYPE_SUPL = 4; // 0x4
|
field public static final int TYPE_SUPL = 4; // 0x4
|
||||||
|
field public static final int TYPE_VSIM = 4096; // 0x1000
|
||||||
field public static final int TYPE_XCAP = 2048; // 0x800
|
field public static final int TYPE_XCAP = 2048; // 0x800
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12150,6 +12150,7 @@ package android.telephony.data {
|
|||||||
method public static int getApnTypeInt(@NonNull String);
|
method public static int getApnTypeInt(@NonNull String);
|
||||||
method @NonNull public static String getApnTypeString(int);
|
method @NonNull public static String getApnTypeString(int);
|
||||||
field public static final String TYPE_ALL_STRING = "*";
|
field public static final String TYPE_ALL_STRING = "*";
|
||||||
|
field public static final String TYPE_BIP_STRING = "bip";
|
||||||
field public static final String TYPE_CBS_STRING = "cbs";
|
field public static final String TYPE_CBS_STRING = "cbs";
|
||||||
field public static final String TYPE_DEFAULT_STRING = "default";
|
field public static final String TYPE_DEFAULT_STRING = "default";
|
||||||
field public static final String TYPE_DUN_STRING = "dun";
|
field public static final String TYPE_DUN_STRING = "dun";
|
||||||
@@ -12161,6 +12162,7 @@ package android.telephony.data {
|
|||||||
field public static final String TYPE_MCX_STRING = "mcx";
|
field public static final String TYPE_MCX_STRING = "mcx";
|
||||||
field public static final String TYPE_MMS_STRING = "mms";
|
field public static final String TYPE_MMS_STRING = "mms";
|
||||||
field public static final String TYPE_SUPL_STRING = "supl";
|
field public static final String TYPE_SUPL_STRING = "supl";
|
||||||
|
field public static final String TYPE_VSIM_STRING = "vsim";
|
||||||
field public static final String TYPE_XCAP_STRING = "xcap";
|
field public static final String TYPE_XCAP_STRING = "xcap";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -277,11 +277,13 @@ package android.net {
|
|||||||
method @NonNull public int[] getTransportTypes();
|
method @NonNull public int[] getTransportTypes();
|
||||||
method public boolean isPrivateDnsBroken();
|
method public boolean isPrivateDnsBroken();
|
||||||
method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities);
|
method public boolean satisfiedByNetworkCapabilities(@Nullable android.net.NetworkCapabilities);
|
||||||
|
field public static final int NET_CAPABILITY_BIP = 31; // 0x1f
|
||||||
field public static final int NET_CAPABILITY_NOT_VCN_MANAGED = 28; // 0x1c
|
field public static final int NET_CAPABILITY_NOT_VCN_MANAGED = 28; // 0x1c
|
||||||
field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
|
field public static final int NET_CAPABILITY_OEM_PAID = 22; // 0x16
|
||||||
field public static final int NET_CAPABILITY_OEM_PRIVATE = 26; // 0x1a
|
field public static final int NET_CAPABILITY_OEM_PRIVATE = 26; // 0x1a
|
||||||
field public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; // 0x18
|
field public static final int NET_CAPABILITY_PARTIAL_CONNECTIVITY = 24; // 0x18
|
||||||
field public static final int NET_CAPABILITY_VEHICLE_INTERNAL = 27; // 0x1b
|
field public static final int NET_CAPABILITY_VEHICLE_INTERNAL = 27; // 0x1b
|
||||||
|
field public static final int NET_CAPABILITY_VSIM = 30; // 0x1e
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class NetworkCapabilities.Builder {
|
public static final class NetworkCapabilities.Builder {
|
||||||
|
|||||||
@@ -273,6 +273,8 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
NET_CAPABILITY_VEHICLE_INTERNAL,
|
NET_CAPABILITY_VEHICLE_INTERNAL,
|
||||||
NET_CAPABILITY_NOT_VCN_MANAGED,
|
NET_CAPABILITY_NOT_VCN_MANAGED,
|
||||||
NET_CAPABILITY_ENTERPRISE,
|
NET_CAPABILITY_ENTERPRISE,
|
||||||
|
NET_CAPABILITY_VSIM,
|
||||||
|
NET_CAPABILITY_BIP,
|
||||||
})
|
})
|
||||||
public @interface NetCapability { }
|
public @interface NetCapability { }
|
||||||
|
|
||||||
@@ -492,8 +494,22 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
*/
|
*/
|
||||||
public static final int NET_CAPABILITY_ENTERPRISE = 29;
|
public static final int NET_CAPABILITY_ENTERPRISE = 29;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that this network has ability to access the carrier's Virtual Sim service.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public static final int NET_CAPABILITY_VSIM = 30;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates that this network has ability to support Bearer Independent Protol.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public static final int NET_CAPABILITY_BIP = 31;
|
||||||
|
|
||||||
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
|
private static final int MIN_NET_CAPABILITY = NET_CAPABILITY_MMS;
|
||||||
private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_ENTERPRISE;
|
private static final int MAX_NET_CAPABILITY = NET_CAPABILITY_BIP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Network capabilities that are expected to be mutable, i.e., can change while a particular
|
* Network capabilities that are expected to be mutable, i.e., can change while a particular
|
||||||
@@ -2089,6 +2105,8 @@ public final class NetworkCapabilities implements Parcelable {
|
|||||||
case NET_CAPABILITY_VEHICLE_INTERNAL: return "VEHICLE_INTERNAL";
|
case NET_CAPABILITY_VEHICLE_INTERNAL: return "VEHICLE_INTERNAL";
|
||||||
case NET_CAPABILITY_NOT_VCN_MANAGED: return "NOT_VCN_MANAGED";
|
case NET_CAPABILITY_NOT_VCN_MANAGED: return "NOT_VCN_MANAGED";
|
||||||
case NET_CAPABILITY_ENTERPRISE: return "ENTERPRISE";
|
case NET_CAPABILITY_ENTERPRISE: return "ENTERPRISE";
|
||||||
|
case NET_CAPABILITY_VSIM: return "VSIM";
|
||||||
|
case NET_CAPABILITY_BIP: return "BIP";
|
||||||
default: return Integer.toString(capability);
|
default: return Integer.toString(capability);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,11 +114,15 @@ public class ApnSetting implements Parcelable {
|
|||||||
public static final int TYPE_MCX = ApnTypes.MCX;
|
public static final int TYPE_MCX = ApnTypes.MCX;
|
||||||
/** APN type for XCAP. */
|
/** APN type for XCAP. */
|
||||||
public static final int TYPE_XCAP = ApnTypes.XCAP;
|
public static final int TYPE_XCAP = ApnTypes.XCAP;
|
||||||
|
/** APN type for VSIM. */
|
||||||
|
public static final int TYPE_VSIM = 1 << 12; // TODO: Refer to ApnTypes.VSIM
|
||||||
|
/** APN type for BIP. */
|
||||||
|
public static final int TYPE_BIP = 1 << 13; // TODO: Refer to ApnTypes.BIP
|
||||||
/**
|
/**
|
||||||
* APN type for ENTERPRISE.
|
* APN type for ENTERPRISE.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public static final int TYPE_ENTERPRISE = TYPE_XCAP << 1;
|
public static final int TYPE_ENTERPRISE = TYPE_BIP << 1;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@IntDef(flag = true, prefix = {"TYPE_"}, value = {
|
@IntDef(flag = true, prefix = {"TYPE_"}, value = {
|
||||||
@@ -134,6 +138,8 @@ public class ApnSetting implements Parcelable {
|
|||||||
TYPE_EMERGENCY,
|
TYPE_EMERGENCY,
|
||||||
TYPE_MCX,
|
TYPE_MCX,
|
||||||
TYPE_XCAP,
|
TYPE_XCAP,
|
||||||
|
TYPE_BIP,
|
||||||
|
TYPE_VSIM,
|
||||||
TYPE_ENTERPRISE,
|
TYPE_ENTERPRISE,
|
||||||
})
|
})
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@@ -174,6 +180,8 @@ public class ApnSetting implements Parcelable {
|
|||||||
TYPE_MMS_STRING,
|
TYPE_MMS_STRING,
|
||||||
TYPE_SUPL_STRING,
|
TYPE_SUPL_STRING,
|
||||||
TYPE_XCAP_STRING,
|
TYPE_XCAP_STRING,
|
||||||
|
TYPE_VSIM_STRING,
|
||||||
|
TYPE_BIP_STRING,
|
||||||
TYPE_ENTERPRISE_STRING,
|
TYPE_ENTERPRISE_STRING,
|
||||||
}, prefix = "TYPE_", suffix = "_STRING")
|
}, prefix = "TYPE_", suffix = "_STRING")
|
||||||
@Retention(RetentionPolicy.SOURCE)
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
@@ -315,8 +323,33 @@ public class ApnSetting implements Parcelable {
|
|||||||
@SystemApi
|
@SystemApi
|
||||||
public static final String TYPE_XCAP_STRING = "xcap";
|
public static final String TYPE_XCAP_STRING = "xcap";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APN type for Virtual SIM service.
|
||||||
|
*
|
||||||
|
* Note: String representations of APN types are intended for system apps to communicate with
|
||||||
|
* modem components or carriers. Non-system apps should use the integer variants instead.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public static final String TYPE_VSIM_STRING = "vsim";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* APN type for Bearer Independent Protocol.
|
||||||
|
*
|
||||||
|
* Note: String representations of APN types are intended for system apps to communicate with
|
||||||
|
* modem components or carriers. Non-system apps should use the integer variants instead.
|
||||||
|
* @hide
|
||||||
|
*/
|
||||||
|
@SystemApi
|
||||||
|
public static final String TYPE_BIP_STRING = "bip";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* APN type for ENTERPRISE traffic.
|
* APN type for ENTERPRISE traffic.
|
||||||
|
*
|
||||||
|
* Note: String representations of APN types are intended for system apps to communicate with
|
||||||
|
* modem components or carriers. Non-system apps should use the integer variants instead.
|
||||||
* @hide
|
* @hide
|
||||||
*/
|
*/
|
||||||
public static final String TYPE_ENTERPRISE_STRING = "enterprise";
|
public static final String TYPE_ENTERPRISE_STRING = "enterprise";
|
||||||
@@ -401,6 +434,8 @@ public class ApnSetting implements Parcelable {
|
|||||||
APN_TYPE_STRING_MAP.put(TYPE_MCX_STRING, TYPE_MCX);
|
APN_TYPE_STRING_MAP.put(TYPE_MCX_STRING, TYPE_MCX);
|
||||||
APN_TYPE_STRING_MAP.put(TYPE_XCAP_STRING, TYPE_XCAP);
|
APN_TYPE_STRING_MAP.put(TYPE_XCAP_STRING, TYPE_XCAP);
|
||||||
APN_TYPE_STRING_MAP.put(TYPE_ENTERPRISE_STRING, TYPE_ENTERPRISE);
|
APN_TYPE_STRING_MAP.put(TYPE_ENTERPRISE_STRING, TYPE_ENTERPRISE);
|
||||||
|
APN_TYPE_STRING_MAP.put(TYPE_VSIM_STRING, TYPE_VSIM);
|
||||||
|
APN_TYPE_STRING_MAP.put(TYPE_BIP_STRING, TYPE_BIP);
|
||||||
|
|
||||||
APN_TYPE_INT_MAP = new ArrayMap<>();
|
APN_TYPE_INT_MAP = new ArrayMap<>();
|
||||||
APN_TYPE_INT_MAP.put(TYPE_DEFAULT, TYPE_DEFAULT_STRING);
|
APN_TYPE_INT_MAP.put(TYPE_DEFAULT, TYPE_DEFAULT_STRING);
|
||||||
@@ -416,6 +451,8 @@ public class ApnSetting implements Parcelable {
|
|||||||
APN_TYPE_INT_MAP.put(TYPE_MCX, TYPE_MCX_STRING);
|
APN_TYPE_INT_MAP.put(TYPE_MCX, TYPE_MCX_STRING);
|
||||||
APN_TYPE_INT_MAP.put(TYPE_XCAP, TYPE_XCAP_STRING);
|
APN_TYPE_INT_MAP.put(TYPE_XCAP, TYPE_XCAP_STRING);
|
||||||
APN_TYPE_INT_MAP.put(TYPE_ENTERPRISE, TYPE_ENTERPRISE_STRING);
|
APN_TYPE_INT_MAP.put(TYPE_ENTERPRISE, TYPE_ENTERPRISE_STRING);
|
||||||
|
APN_TYPE_INT_MAP.put(TYPE_VSIM, TYPE_VSIM_STRING);
|
||||||
|
APN_TYPE_INT_MAP.put(TYPE_BIP, TYPE_BIP_STRING);
|
||||||
|
|
||||||
PROTOCOL_STRING_MAP = new ArrayMap<>();
|
PROTOCOL_STRING_MAP = new ArrayMap<>();
|
||||||
PROTOCOL_STRING_MAP.put("IP", PROTOCOL_IP);
|
PROTOCOL_STRING_MAP.put("IP", PROTOCOL_IP);
|
||||||
@@ -2194,7 +2231,7 @@ public class ApnSetting implements Parcelable {
|
|||||||
public ApnSetting build() {
|
public ApnSetting build() {
|
||||||
if ((mApnTypeBitmask & (TYPE_DEFAULT | TYPE_MMS | TYPE_SUPL | TYPE_DUN | TYPE_HIPRI
|
if ((mApnTypeBitmask & (TYPE_DEFAULT | TYPE_MMS | TYPE_SUPL | TYPE_DUN | TYPE_HIPRI
|
||||||
| TYPE_FOTA | TYPE_IMS | TYPE_CBS | TYPE_IA | TYPE_EMERGENCY | TYPE_MCX
|
| TYPE_FOTA | TYPE_IMS | TYPE_CBS | TYPE_IA | TYPE_EMERGENCY | TYPE_MCX
|
||||||
| TYPE_XCAP | TYPE_ENTERPRISE)) == 0
|
| TYPE_XCAP | TYPE_VSIM | TYPE_BIP | TYPE_ENTERPRISE)) == 0
|
||||||
|| TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) {
|
|| TextUtils.isEmpty(mApnName) || TextUtils.isEmpty(mEntryName)) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user