Merge "Add some error-case logging." into gingerbread
This commit is contained in:
@ -1038,10 +1038,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
if (mNetAttributes[checkType] == null) continue;
|
if (mNetAttributes[checkType] == null) continue;
|
||||||
if (mNetAttributes[checkType].mRadio == ConnectivityManager.TYPE_MOBILE &&
|
if (mNetAttributes[checkType].mRadio == ConnectivityManager.TYPE_MOBILE &&
|
||||||
noMobileData) {
|
noMobileData) {
|
||||||
if (DBG) {
|
Slog.e(TAG, "not failing over to mobile type " + checkType +
|
||||||
Slog.d(TAG, "not failing over to mobile type " + checkType +
|
|
||||||
" because Mobile Data Disabled");
|
" because Mobile Data Disabled");
|
||||||
}
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (mNetAttributes[checkType].isDefault()) {
|
if (mNetAttributes[checkType].isDefault()) {
|
||||||
@ -1089,6 +1087,8 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
newNet = null; // not officially avail.. try anyway, but
|
newNet = null; // not officially avail.. try anyway, but
|
||||||
// report no failover
|
// report no failover
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
Slog.e(TAG, "Network failover failing.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1131,16 +1131,13 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
String reason = info.getReason();
|
String reason = info.getReason();
|
||||||
String extraInfo = info.getExtraInfo();
|
String extraInfo = info.getExtraInfo();
|
||||||
|
|
||||||
if (DBG) {
|
|
||||||
String reasonText;
|
String reasonText;
|
||||||
if (reason == null) {
|
if (reason == null) {
|
||||||
reasonText = ".";
|
reasonText = ".";
|
||||||
} else {
|
} else {
|
||||||
reasonText = " (" + reason + ").";
|
reasonText = " (" + reason + ").";
|
||||||
}
|
}
|
||||||
Slog.v(TAG, "Attempt to connect to " + info.getTypeName() +
|
Slog.e(TAG, "Attempt to connect to " + info.getTypeName() + " failed" + reasonText);
|
||||||
" failed" + reasonText);
|
|
||||||
}
|
|
||||||
|
|
||||||
Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION);
|
Intent intent = new Intent(ConnectivityManager.CONNECTIVITY_ACTION);
|
||||||
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info);
|
intent.putExtra(ConnectivityManager.EXTRA_NETWORK_INFO, info);
|
||||||
@ -1164,9 +1161,9 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
|||||||
if (newNet != null) {
|
if (newNet != null) {
|
||||||
NetworkInfo switchTo = newNet.getNetworkInfo();
|
NetworkInfo switchTo = newNet.getNetworkInfo();
|
||||||
if (!switchTo.isConnected()) {
|
if (!switchTo.isConnected()) {
|
||||||
// if the other net is connected they've already reset this and perhaps even gotten
|
// if the other net is connected they've already reset this and perhaps
|
||||||
// a positive report we don't want to overwrite, but if not we need to clear this now
|
// even gotten a positive report we don't want to overwrite, but if not
|
||||||
// to turn our cellular sig strength white
|
// we need to clear this now to turn our cellular sig strength white
|
||||||
mDefaultInetConditionPublished = 0;
|
mDefaultInetConditionPublished = 0;
|
||||||
}
|
}
|
||||||
intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo);
|
intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo);
|
||||||
|
Reference in New Issue
Block a user