Send availability info more reliably

We don't have a monolithic availability state, so the mAvailable variable
must go.

bug:5453318
Change-Id: I82af90907cc7a0173b74d661912f9c28ddc7dcb0
This commit is contained in:
Robert Greenwalt
2011-10-17 22:10:03 -07:00
parent 61e980d618
commit 12e24ae760
5 changed files with 36 additions and 45 deletions

View File

@@ -197,7 +197,10 @@ public class MobileDataStateTracker implements NetworkStateTracker {
String apnName = intent.getStringExtra(Phone.DATA_APN_KEY);
mNetworkInfo.setRoaming(intent.getBooleanExtra(Phone.DATA_NETWORK_ROAMING_KEY,
false));
if (VDBG) {
log(mApnType + " setting isAvailable to " +
intent.getBooleanExtra(Phone.NETWORK_UNAVAILABLE_KEY,false));
}
mNetworkInfo.setIsAvailable(!intent.getBooleanExtra(Phone.NETWORK_UNAVAILABLE_KEY,
false));

View File

@@ -132,6 +132,9 @@ public interface NetworkStateTracker {
* Returns an indication of whether this network is available for
* connections. A value of {@code false} means that some quasi-permanent
* condition prevents connectivity to this network.
*
* NOTE that this is broken on multi-connection devices. Should be fixed in J release
* TODO - fix on multi-pdp devices
*/
public boolean isAvailable();