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:
@@ -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));
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user