Loading docs/html/search.jd +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2,7 +2,7 @@ page.title=Search Results @jd:body @jd:body <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="/assets/jquery-history.js" type="text/javascript"></script> <script src="{@docRoot}assets/jquery-history.js" type="text/javascript"></script> <script type="text/javascript"> <script type="text/javascript"> var tabIndex = 0; var tabIndex = 0; Loading services/java/com/android/server/ConnectivityService.java +29 −15 Original line number Original line Diff line number Diff line Loading @@ -811,13 +811,16 @@ public class ConnectivityService extends IConnectivityManager.Stub { info.getExtraInfo()); info.getExtraInfo()); } } NetworkStateTracker newNet = tryFailover(prevNetType); NetworkStateTracker newNet = null; if (mNetAttributes[prevNetType].isDefault()) { newNet = tryFailover(prevNetType); if (newNet != null) { if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); NetworkInfo switchTo = newNet.getNetworkInfo(); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { } else { intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } } // do this before we broadcast the change // do this before we broadcast the change handleConnectivityChange(); handleConnectivityChange(); Loading @@ -831,7 +834,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } } } } // returns -1 if no failover available // returns null if no failover available private NetworkStateTracker tryFailover(int prevNetType) { private NetworkStateTracker tryFailover(int prevNetType) { /* /* * If this is a default network, check if other defaults are available * If this is a default network, check if other defaults are available Loading Loading @@ -953,13 +956,17 @@ public class ConnectivityService extends IConnectivityManager.Stub { info.setFailover(false); info.setFailover(false); } } NetworkStateTracker newNet = tryFailover(info.getType()); NetworkStateTracker newNet = null; if (mNetAttributes[info.getType()].isDefault()) { newNet = tryFailover(info.getType()); if (newNet != null) { if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); NetworkInfo switchTo = newNet.getNetworkInfo(); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { } else { intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } } // do this before we broadcast the change // do this before we broadcast the change handleConnectivityChange(); handleConnectivityChange(); Loading Loading @@ -1269,9 +1276,16 @@ public class ConnectivityService extends IConnectivityManager.Stub { info = (NetworkInfo) msg.obj; info = (NetworkInfo) msg.obj; int type = info.getType(); int type = info.getType(); NetworkInfo.State state = info.getState(); NetworkInfo.State state = info.getState(); if (mNetAttributes[type].mLastState == state) { // only do this optimization for wifi. It going into scan mode for location // services generates alot of noise. Meanwhile the mms apn won't send out // subsequent notifications when on default cellular because it never // disconnects.. so only do this to wifi notifications. Fixed better when the // APN notifications are standardized. if (mNetAttributes[type].mLastState == state && mNetAttributes[type].mRadio == ConnectivityManager.TYPE_WIFI) { if (DBG) { if (DBG) { // TODO - remove this after we validate the dropping doesn't break anything // TODO - remove this after we validate the dropping doesn't break // anything Log.d(TAG, "Dropping ConnectivityChange for " + Log.d(TAG, "Dropping ConnectivityChange for " + info.getTypeName() + ": " + info.getTypeName() + ": " + state + "/" + info.getDetailedState()); state + "/" + info.getDetailedState()); Loading Loading
docs/html/search.jd +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2,7 +2,7 @@ page.title=Search Results @jd:body @jd:body <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="/assets/jquery-history.js" type="text/javascript"></script> <script src="{@docRoot}assets/jquery-history.js" type="text/javascript"></script> <script type="text/javascript"> <script type="text/javascript"> var tabIndex = 0; var tabIndex = 0; Loading
services/java/com/android/server/ConnectivityService.java +29 −15 Original line number Original line Diff line number Diff line Loading @@ -811,13 +811,16 @@ public class ConnectivityService extends IConnectivityManager.Stub { info.getExtraInfo()); info.getExtraInfo()); } } NetworkStateTracker newNet = tryFailover(prevNetType); NetworkStateTracker newNet = null; if (mNetAttributes[prevNetType].isDefault()) { newNet = tryFailover(prevNetType); if (newNet != null) { if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); NetworkInfo switchTo = newNet.getNetworkInfo(); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { } else { intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } } // do this before we broadcast the change // do this before we broadcast the change handleConnectivityChange(); handleConnectivityChange(); Loading @@ -831,7 +834,7 @@ public class ConnectivityService extends IConnectivityManager.Stub { } } } } // returns -1 if no failover available // returns null if no failover available private NetworkStateTracker tryFailover(int prevNetType) { private NetworkStateTracker tryFailover(int prevNetType) { /* /* * If this is a default network, check if other defaults are available * If this is a default network, check if other defaults are available Loading Loading @@ -953,13 +956,17 @@ public class ConnectivityService extends IConnectivityManager.Stub { info.setFailover(false); info.setFailover(false); } } NetworkStateTracker newNet = tryFailover(info.getType()); NetworkStateTracker newNet = null; if (mNetAttributes[info.getType()].isDefault()) { newNet = tryFailover(info.getType()); if (newNet != null) { if (newNet != null) { NetworkInfo switchTo = newNet.getNetworkInfo(); NetworkInfo switchTo = newNet.getNetworkInfo(); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); intent.putExtra(ConnectivityManager.EXTRA_OTHER_NETWORK_INFO, switchTo); } else { } else { intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); intent.putExtra(ConnectivityManager.EXTRA_NO_CONNECTIVITY, true); } } } // do this before we broadcast the change // do this before we broadcast the change handleConnectivityChange(); handleConnectivityChange(); Loading Loading @@ -1269,9 +1276,16 @@ public class ConnectivityService extends IConnectivityManager.Stub { info = (NetworkInfo) msg.obj; info = (NetworkInfo) msg.obj; int type = info.getType(); int type = info.getType(); NetworkInfo.State state = info.getState(); NetworkInfo.State state = info.getState(); if (mNetAttributes[type].mLastState == state) { // only do this optimization for wifi. It going into scan mode for location // services generates alot of noise. Meanwhile the mms apn won't send out // subsequent notifications when on default cellular because it never // disconnects.. so only do this to wifi notifications. Fixed better when the // APN notifications are standardized. if (mNetAttributes[type].mLastState == state && mNetAttributes[type].mRadio == ConnectivityManager.TYPE_WIFI) { if (DBG) { if (DBG) { // TODO - remove this after we validate the dropping doesn't break anything // TODO - remove this after we validate the dropping doesn't break // anything Log.d(TAG, "Dropping ConnectivityChange for " + Log.d(TAG, "Dropping ConnectivityChange for " + info.getTypeName() + ": " + info.getTypeName() + ": " + state + "/" + info.getDetailedState()); state + "/" + info.getDetailedState()); Loading