-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetUtil
More file actions
34 lines (29 loc) · 936 Bytes
/
Copy pathNetUtil
File metadata and controls
34 lines (29 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//网络工具类
public class NetUtil{
/**
* 获取运营商名称. (反编译快手代码)
*/
public static String getSimOperatorName(Context paramContext)
{
Object localObject = (TelephonyManager)paramContext.getSystemService("phone");
paramContext = ((TelephonyManager)localObject).getSimOperator();
localObject = ((TelephonyManager)localObject).getSimOperatorName();
if (!TextUtils.isEmpty((CharSequence)localObject)) {
return (String)localObject;
}
if (paramContext != null)
{
if ((paramContext.equals("46000")) || (paramContext.equals("46002")) || (paramContext.equals("46007"))) {
return "中国移动";
}
if ((paramContext.equals("46001")) || (paramContext.equals("46009"))) {
return "中国联通";
}
if (paramContext.equals("46003")) {
return "中国电信";
}
return paramContext;
}
return "";
}
}