判断是否是3G网络 @param context @return
(Context context)
| 55 | * @return |
| 56 | */ |
| 57 | public static boolean is3rd(Context context) { |
| 58 | ConnectivityManager cm = (ConnectivityManager) context |
| 59 | .getSystemService(Context.CONNECTIVITY_SERVICE); |
| 60 | NetworkInfo networkINfo = cm.getActiveNetworkInfo(); |
| 61 | if (networkINfo != null |
| 62 | && networkINfo.getType() == ConnectivityManager.TYPE_MOBILE) { |
| 63 | return true; |
| 64 | } |
| 65 | return false; |
| 66 | } |
| 67 | |
| 68 | /** |
| 69 | * 判断是wifi还是3g网络 |
nothing calls this directly
no outgoing calls
no test coverage detected