Note net availability even when apn not enabled
Fixes a problem where mms apn was on when we lost the network (airplane mode) but mms was off when airplane mode was turned off so it kept thinking we didn't have access and future mms always failed. bug: 2075145
This commit is contained in:
@ -147,7 +147,10 @@ public class MobileDataStateTracker extends NetworkStateTracker {
|
||||
", unavailable = " + unavailable + ", reason = " +
|
||||
(reason == null ? "(unspecified)" : reason));
|
||||
|
||||
|
||||
if (isApnTypeIncluded(apnTypeList)) {
|
||||
// set this even if the apn isn't Enabled
|
||||
mNetworkInfo.setIsAvailable(!unavailable);
|
||||
if (mEnabled == false) {
|
||||
// if we're not enabled but the APN Type is supported by this connection
|
||||
// we should record the interface name if one's provided. If the user
|
||||
@ -168,7 +171,6 @@ public class MobileDataStateTracker extends NetworkStateTracker {
|
||||
return;
|
||||
}
|
||||
|
||||
mNetworkInfo.setIsAvailable(!unavailable);
|
||||
if (mMobileDataState != state) {
|
||||
mMobileDataState = state;
|
||||
switch (state) {
|
||||
|
@ -453,7 +453,8 @@ public abstract class DataConnectionTracker extends Handler {
|
||||
}
|
||||
|
||||
protected synchronized void setEnabled(int id, boolean enable) {
|
||||
if (DBG) Log.d(LOG_TAG, "setEnabled(" + id + ", " + enable + ')');
|
||||
if (DBG) Log.d(LOG_TAG, "setEnabled(" + id + ", " + enable + ") with old state = " +
|
||||
dataEnabled[id] + " and enabledCount = " + enabledCount);
|
||||
if (dataEnabled[id] != enable) {
|
||||
dataEnabled[id] = enable;
|
||||
|
||||
|
Reference in New Issue
Block a user