mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-04-28 22:50:09 +08:00
Merge pull request #1 from VinuL/VinuL-patch-1
Update NetworkManager.java
This commit is contained in:
commit
2eaa4daed4
@ -45,6 +45,7 @@ public class NetworkManager extends CordovaPlugin {
|
|||||||
|
|
||||||
public static final String WIFI = "wifi";
|
public static final String WIFI = "wifi";
|
||||||
public static final String WIMAX = "wimax";
|
public static final String WIMAX = "wimax";
|
||||||
|
public static final String ETHERNET = "ethernet";
|
||||||
// mobile
|
// mobile
|
||||||
public static final String MOBILE = "mobile";
|
public static final String MOBILE = "mobile";
|
||||||
|
|
||||||
@ -240,6 +241,9 @@ public class NetworkManager extends CordovaPlugin {
|
|||||||
if (type.equals(WIFI)) {
|
if (type.equals(WIFI)) {
|
||||||
return TYPE_WIFI;
|
return TYPE_WIFI;
|
||||||
}
|
}
|
||||||
|
else if (type.toLowerCase().equals(ETHERNET)) {
|
||||||
|
return TYPE_ETHERNET;
|
||||||
|
}
|
||||||
else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
|
else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
|
||||||
type = info.getSubtypeName();
|
type = info.getSubtypeName();
|
||||||
if (type.equals(GSM) ||
|
if (type.equals(GSM) ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user