Merge "Attribute data usage to virtual RAT type for 5G non-standalone mode" am: 6f3a50cc18 am: 416911a122
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1364497 Change-Id: Idef0dd6e0e0486b76c0067540e580d444e97d6a0
This commit is contained in:
@@ -87,6 +87,15 @@ public class NetworkTemplate implements Parcelable {
|
||||
* @hide
|
||||
*/
|
||||
public static final int NETWORK_TYPE_ALL = -1;
|
||||
/**
|
||||
* Virtual RAT type to represent 5G NSA (Non Stand Alone) mode, where the primary cell is
|
||||
* still LTE and network allocates a secondary 5G cell so telephony reports RAT = LTE along
|
||||
* with NR state as connected. This should not be overlapped with any of the
|
||||
* {@code TelephonyManager.NETWORK_TYPE_*} constants.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final int NETWORK_TYPE_5G_NSA = -2;
|
||||
|
||||
private static boolean isKnownMatchRule(final int rule) {
|
||||
switch (rule) {
|
||||
@@ -475,6 +484,9 @@ public class NetworkTemplate implements Parcelable {
|
||||
return TelephonyManager.NETWORK_TYPE_LTE;
|
||||
case TelephonyManager.NETWORK_TYPE_NR:
|
||||
return TelephonyManager.NETWORK_TYPE_NR;
|
||||
// Virtual RAT type for 5G NSA mode, see {@link NetworkTemplate#NETWORK_TYPE_5G_NSA}.
|
||||
case NetworkTemplate.NETWORK_TYPE_5G_NSA:
|
||||
return NetworkTemplate.NETWORK_TYPE_5G_NSA;
|
||||
default:
|
||||
return TelephonyManager.NETWORK_TYPE_UNKNOWN;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user