File tree Expand file tree Collapse file tree 3 files changed +16
-0
lines changed
telephony/java/com/android/internal/telephony Expand file tree Collapse file tree 3 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1139,6 +1139,14 @@ protected void onSetUserDataEnabled(boolean enabled) {
11391139 mUserDataEnabled = enabled ;
11401140 Settings .Secure .putInt (mPhone .getContext ().getContentResolver (),
11411141 Settings .Secure .MOBILE_DATA , enabled ? 1 : 0 );
1142+ if (getDataOnRoamingEnabled () == false &&
1143+ mPhone .getServiceState ().getRoaming () == true ) {
1144+ if (enabled ) {
1145+ notifyOffApnsOfAvailability (Phone .REASON_ROAMING_ON );
1146+ } else {
1147+ notifyOffApnsOfAvailability (Phone .REASON_DATA_DISABLED );
1148+ }
1149+ }
11421150 if (prevEnabled != getAnyDataEnabled ()) {
11431151 if (!prevEnabled ) {
11441152 resetAllRetryCounts ();
Original file line number Diff line number Diff line change @@ -629,6 +629,8 @@ protected boolean onTrySetupData(String reason) {
629629 */
630630 @ Override
631631 protected void onRoamingOff () {
632+ if (mUserDataEnabled == false ) return ;
633+
632634 if (getDataOnRoamingEnabled () == false ) {
633635 notifyOffApnsOfAvailability (Phone .REASON_ROAMING_OFF );
634636 trySetupData (Phone .REASON_ROAMING_OFF );
@@ -642,6 +644,8 @@ protected void onRoamingOff() {
642644 */
643645 @ Override
644646 protected void onRoamingOn () {
647+ if (mUserDataEnabled == false ) return ;
648+
645649 if (getDataOnRoamingEnabled ()) {
646650 trySetupData (Phone .REASON_ROAMING_ON );
647651 notifyDataConnection (Phone .REASON_ROAMING_ON );
Original file line number Diff line number Diff line change @@ -1863,6 +1863,8 @@ protected boolean onTrySetupData(ApnContext apnContext) {
18631863 protected void onRoamingOff () {
18641864 if (DBG ) log ("onRoamingOff" );
18651865
1866+ if (mUserDataEnabled == false ) return ;
1867+
18661868 if (getDataOnRoamingEnabled () == false ) {
18671869 notifyOffApnsOfAvailability (Phone .REASON_ROAMING_OFF );
18681870 setupDataOnReadyApns (Phone .REASON_ROAMING_OFF );
@@ -1873,6 +1875,8 @@ protected void onRoamingOff() {
18731875
18741876 @ Override
18751877 protected void onRoamingOn () {
1878+ if (mUserDataEnabled == false ) return ;
1879+
18761880 if (getDataOnRoamingEnabled ()) {
18771881 if (DBG ) log ("onRoamingOn: setup data on roaming" );
18781882 setupDataOnReadyApns (Phone .REASON_ROAMING_ON );
You can’t perform that action at this time.
0 commit comments