diff options
Diffstat (limited to 'telephony')
3 files changed, 16 insertions, 0 deletions
diff --git a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java index 55f2ca3..97a8755 100644 --- a/telephony/java/com/android/internal/telephony/DataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/DataConnectionTracker.java @@ -1139,6 +1139,14 @@ public abstract class DataConnectionTracker extends Handler { mUserDataEnabled = enabled; Settings.Secure.putInt(mPhone.getContext().getContentResolver(), Settings.Secure.MOBILE_DATA, enabled ? 1 : 0); + if (getDataOnRoamingEnabled() == false && + mPhone.getServiceState().getRoaming() == true) { + if (enabled) { + notifyOffApnsOfAvailability(Phone.REASON_ROAMING_ON); + } else { + notifyOffApnsOfAvailability(Phone.REASON_DATA_DISABLED); + } + } if (prevEnabled != getAnyDataEnabled()) { if (!prevEnabled) { resetAllRetryCounts(); diff --git a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java index 7e5e707..a691eae 100644 --- a/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/cdma/CdmaDataConnectionTracker.java @@ -629,6 +629,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { */ @Override protected void onRoamingOff() { + if (mUserDataEnabled == false) return; + if (getDataOnRoamingEnabled() == false) { notifyOffApnsOfAvailability(Phone.REASON_ROAMING_OFF); trySetupData(Phone.REASON_ROAMING_OFF); @@ -642,6 +644,8 @@ public final class CdmaDataConnectionTracker extends DataConnectionTracker { */ @Override protected void onRoamingOn() { + if (mUserDataEnabled == false) return; + if (getDataOnRoamingEnabled()) { trySetupData(Phone.REASON_ROAMING_ON); notifyDataConnection(Phone.REASON_ROAMING_ON); diff --git a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java index 56dbfb8..bfdb706 100644 --- a/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java +++ b/telephony/java/com/android/internal/telephony/gsm/GsmDataConnectionTracker.java @@ -1863,6 +1863,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { protected void onRoamingOff() { if (DBG) log("onRoamingOff"); + if (mUserDataEnabled == false) return; + if (getDataOnRoamingEnabled() == false) { notifyOffApnsOfAvailability(Phone.REASON_ROAMING_OFF); setupDataOnReadyApns(Phone.REASON_ROAMING_OFF); @@ -1873,6 +1875,8 @@ public final class GsmDataConnectionTracker extends DataConnectionTracker { @Override protected void onRoamingOn() { + if (mUserDataEnabled == false) return; + if (getDataOnRoamingEnabled()) { if (DBG) log("onRoamingOn: setup data on roaming"); setupDataOnReadyApns(Phone.REASON_ROAMING_ON); |