mirror of
https://gitee.com/shuto/cordova-plugin-network-information.git
synced 2025-03-15 12:51:00 +08:00
Merge branch 'patch-1' of https://github.com/dankito/cordova-plugin-network-information
This closes #44
This commit is contained in:
commit
257e8ada4f
@ -69,6 +69,7 @@ public class NetworkManager extends CordovaPlugin {
|
||||
// return type
|
||||
public static final String TYPE_UNKNOWN = "unknown";
|
||||
public static final String TYPE_ETHERNET = "ethernet";
|
||||
public static final String TYPE_ETHERNET_SHORT = "eth";
|
||||
public static final String TYPE_WIFI = "wifi";
|
||||
public static final String TYPE_2G = "2g";
|
||||
public static final String TYPE_3G = "3g";
|
||||
@ -246,7 +247,7 @@ public class NetworkManager extends CordovaPlugin {
|
||||
if (type.equals(WIFI)) {
|
||||
return TYPE_WIFI;
|
||||
}
|
||||
else if (type.toLowerCase().equals(TYPE_ETHERNET)) {
|
||||
else if (type.toLowerCase().equals(TYPE_ETHERNET) || type.toLowerCase().startsWith(TYPE_ETHERNET_SHORT) {
|
||||
return TYPE_ETHERNET;
|
||||
}
|
||||
else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user