am 325eed46: am 6548f395: Merge "Inet status bug fix" into gingerbread
Merge commit '325eed464f0eaa89172f447a60449ba4d96b2474' * commit '325eed464f0eaa89172f447a60449ba4d96b2474': Inet status bug fix
This commit is contained in:
@@ -1013,11 +1013,19 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
newNet = tryFailover(prevNetType);
|
||||
if (newNet != null) {
|
||||
NetworkInfo switchTo = newNet.getNetworkInfo();
|
||||
if (!switchTo.isConnected()) {
|
||||
// if the other net is connected they've already reset this and perhaps even gotten
|
||||
// a positive report we don't want to overwrite, but if not we need to clear this now
|
||||
// to turn our cellular sig strength white
|
||||
mDefaultInetConditionPublished = 0;
|
||||
}
|
||||
intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo);
|
||||
} else {
|
||||
mDefaultInetConditionPublished = 0; // we're not connected anymore
|
||||
intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true);
|
||||
}
|
||||
}
|
||||
intent.putExtra(ConnectivityManager.EXTRA_INET_CONDITION, mDefaultInetConditionPublished);
|
||||
// do this before we broadcast the change
|
||||
handleConnectivityChange(prevNetType);
|
||||
|
||||
@@ -1176,12 +1184,20 @@ public class ConnectivityService extends IConnectivityManager.Stub {
|
||||
newNet = tryFailover(info.getType());
|
||||
if (newNet != null) {
|
||||
NetworkInfo switchTo = newNet.getNetworkInfo();
|
||||
if (!switchTo.isConnected()) {
|
||||
// if the other net is connected they've already reset this and perhaps even gotten
|
||||
// a positive report we don't want to overwrite, but if not we need to clear this now
|
||||
// to turn our cellular sig strength white
|
||||
mDefaultInetConditionPublished = 0;
|
||||
}
|
||||
intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo);
|
||||
} else {
|
||||
mDefaultInetConditionPublished = 0;
|
||||
intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true);
|
||||
}
|
||||
}
|
||||
|
||||
intent.putExtra(ConnectivityManager.EXTRA_INET_CONDITION, mDefaultInetConditionPublished);
|
||||
sendStickyBroadcast(intent);
|
||||
/*
|
||||
* If the failover network is already connected, then immediately send
|
||||
|
||||
Reference in New Issue
Block a user