From 9aeebb31ae25bfcf58f6f4c40bead6d460d47c7b Mon Sep 17 00:00:00 2001 From: gio-yanruixue <82151125+gio-yanruixue@users.noreply.github.com> Date: Wed, 17 Nov 2021 17:36:42 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=BD=91=E7=BB=9C=E7=B1=BB=E5=9E=8B?= =?UTF-8?q?=E4=B8=AD=E5=A2=9E=E5=8A=A0=E5=AF=B95g=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/growingio/android/sdk/track/utils/NetworkUtil.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/growingio-tracker-core/src/main/java/com/growingio/android/sdk/track/utils/NetworkUtil.java b/growingio-tracker-core/src/main/java/com/growingio/android/sdk/track/utils/NetworkUtil.java index 74c37c62..f127b478 100644 --- a/growingio-tracker-core/src/main/java/com/growingio/android/sdk/track/utils/NetworkUtil.java +++ b/growingio-tracker-core/src/main/java/com/growingio/android/sdk/track/utils/NetworkUtil.java @@ -91,13 +91,15 @@ public static String getNetworkName(int type, int subType, String subtypeName) { } switch (subType) { //如果是2g类型 + case TelephonyManager.NETWORK_TYPE_GSM: + case TelephonyManager.NETWORK_TYPE_CDMA: case TelephonyManager.NETWORK_TYPE_GPRS: case TelephonyManager.NETWORK_TYPE_EDGE: case TelephonyManager.NETWORK_TYPE_1xRTT: case TelephonyManager.NETWORK_TYPE_IDEN: return "2G"; //如果是3g类型 - case TelephonyManager.NETWORK_TYPE_CDMA: + case TelephonyManager.NETWORK_TYPE_TD_SCDMA: case TelephonyManager.NETWORK_TYPE_EVDO_A: case TelephonyManager.NETWORK_TYPE_UMTS: case TelephonyManager.NETWORK_TYPE_EVDO_0: @@ -110,7 +112,10 @@ public static String getNetworkName(int type, int subType, String subtypeName) { return "3G"; //如果是4g类型 case TelephonyManager.NETWORK_TYPE_LTE: + case TelephonyManager.NETWORK_TYPE_IWLAN: return "4G"; + case TelephonyManager.NETWORK_TYPE_NR: + return "5G"; default: //中国移动 联通 电信 三种3G制式 if ("TD-SCDMA".equalsIgnoreCase(subtypeName)