removed autolayout

This commit is contained in:
PVPoyer 2018-11-05 16:13:11 +01:00
parent 08698002ce
commit acc02f2981

View File

@ -268,7 +268,8 @@ public class NetworkManager extends CordovaPlugin {
// send update to javascript "navigator.network.connection" // send update to javascript "navigator.network.connection"
// Jellybean sends its own info // Jellybean sends its own info
JSONObject thisInfo = this.getConnectionInfo(info); JSONObject thisInfo = this.getConnectionInfo(info);
if (!thisInfo.equals(lastInfo)) { if(!thisInfo.equals(lastInfo))
{
String connectionType = ""; String connectionType = "";
try { try {
connectionType = thisInfo.get("type").toString(); connectionType = thisInfo.get("type").toString();
@ -294,7 +295,8 @@ public class NetworkManager extends CordovaPlugin {
// If we are not connected to any network set type to none // If we are not connected to any network set type to none
if (!info.isConnected()) { if (!info.isConnected()) {
type = TYPE_NONE; type = TYPE_NONE;
} else { }
else {
type = getType(info); type = getType(info);
} }
extraInfo = info.getExtraInfo(); extraInfo = info.getExtraInfo();
@ -343,16 +345,19 @@ public class NetworkManager extends CordovaPlugin {
LOG.d(LOG_TAG, "wifi : " + WIFI); LOG.d(LOG_TAG, "wifi : " + WIFI);
if (type.equals(WIFI)) { if (type.equals(WIFI)) {
return TYPE_WIFI; return TYPE_WIFI;
} else if (type.toLowerCase().equals(TYPE_ETHERNET) || type.toLowerCase().startsWith(TYPE_ETHERNET_SHORT)) { }
else if (type.toLowerCase().equals(TYPE_ETHERNET) || type.toLowerCase().startsWith(TYPE_ETHERNET_SHORT)) {
return TYPE_ETHERNET; return TYPE_ETHERNET;
} else if (type.equals(MOBILE) || type.equals(CELLULAR)) { }
else if (type.equals(MOBILE) || type.equals(CELLULAR)) {
type = info.getSubtypeName().toLowerCase(Locale.US); type = info.getSubtypeName().toLowerCase(Locale.US);
if (type.equals(GSM) || if (type.equals(GSM) ||
type.equals(GPRS) || type.equals(GPRS) ||
type.equals(EDGE) || type.equals(EDGE) ||
type.equals(TWO_G)) { type.equals(TWO_G)) {
return TYPE_2G; return TYPE_2G;
} else if (type.startsWith(CDMA) || }
else if (type.startsWith(CDMA) ||
type.equals(UMTS) || type.equals(UMTS) ||
type.equals(ONEXRTT) || type.equals(ONEXRTT) ||
type.equals(EHRPD) || type.equals(EHRPD) ||
@ -361,14 +366,16 @@ public class NetworkManager extends CordovaPlugin {
type.equals(HSPA) || type.equals(HSPA) ||
type.equals(THREE_G)) { type.equals(THREE_G)) {
return TYPE_3G; return TYPE_3G;
} else if (type.equals(LTE) || }
else if (type.equals(LTE) ||
type.equals(UMB) || type.equals(UMB) ||
type.equals(HSPA_PLUS) || type.equals(HSPA_PLUS) ||
type.equals(FOUR_G)) { type.equals(FOUR_G)) {
return TYPE_4G; return TYPE_4G;
} }
} }
} else { }
else {
return TYPE_NONE; return TYPE_NONE;
} }
return TYPE_UNKNOWN; return TYPE_UNKNOWN;