mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-27 04:42:51 +08:00
Merge branch 'master' of git://github.com/phonegap/phonegap-android
This commit is contained in:
commit
3666490347
@ -38,9 +38,13 @@ public class NetworkManager extends Plugin {
|
|||||||
// 3G network types
|
// 3G network types
|
||||||
public static final String CDMA = "cdma";
|
public static final String CDMA = "cdma";
|
||||||
public static final String UMTS = "umts";
|
public static final String UMTS = "umts";
|
||||||
|
public static final String HSPA = "hspa";
|
||||||
|
public static final String HSUPA = "hsupa";
|
||||||
|
public static final String HSDPA = "hsdpa";
|
||||||
// 4G network types
|
// 4G network types
|
||||||
public static final String LTE = "lte";
|
public static final String LTE = "lte";
|
||||||
public static final String UMB = "umb";
|
public static final String UMB = "umb";
|
||||||
|
public static final String HSPA_PLUS = "hspa+";
|
||||||
// return types
|
// return types
|
||||||
public static final String TYPE_UNKNOWN = "unknown";
|
public static final String TYPE_UNKNOWN = "unknown";
|
||||||
public static final String TYPE_ETHERNET = "ethernet";
|
public static final String TYPE_ETHERNET = "ethernet";
|
||||||
@ -205,11 +209,15 @@ public class NetworkManager extends Plugin {
|
|||||||
return TYPE_2G;
|
return TYPE_2G;
|
||||||
}
|
}
|
||||||
else if (type.toLowerCase().equals(CDMA) ||
|
else if (type.toLowerCase().equals(CDMA) ||
|
||||||
type.toLowerCase().equals(UMTS)) {
|
type.toLowerCase().equals(UMTS) ||
|
||||||
|
type.toLowerCase().equals(HSUPA) ||
|
||||||
|
type.toLowerCase().equals(HSDPA) ||
|
||||||
|
type.toLowerCase().equals(HSPA)) {
|
||||||
return TYPE_3G;
|
return TYPE_3G;
|
||||||
}
|
}
|
||||||
else if (type.toLowerCase().equals(LTE) ||
|
else if (type.toLowerCase().equals(LTE) ||
|
||||||
type.toLowerCase().equals(UMB)) {
|
type.toLowerCase().equals(UMB) ||
|
||||||
|
type.toLowerCase().equals(HSPA_PLUS)) {
|
||||||
return TYPE_4G;
|
return TYPE_4G;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user