Merge branch 'master' of git://github.com/phonegap/phonegap-android

This commit is contained in:
macdonst 2011-08-17 13:45:24 -04:00
commit 3666490347

View File

@ -38,9 +38,13 @@ public class NetworkManager extends Plugin {
// 3G network types
public static final String CDMA = "cdma";
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
public static final String LTE = "lte";
public static final String UMB = "umb";
public static final String HSPA_PLUS = "hspa+";
// return types
public static final String TYPE_UNKNOWN = "unknown";
public static final String TYPE_ETHERNET = "ethernet";
@ -205,11 +209,15 @@ public class NetworkManager extends Plugin {
return TYPE_2G;
}
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;
}
else if (type.toLowerCase().equals(LTE) ||
type.toLowerCase().equals(UMB)) {
type.toLowerCase().equals(UMB) ||
type.toLowerCase().equals(HSPA_PLUS)) {
return TYPE_4G;
}
}