Disable the charge popup when the roaming is turned ON

Some carriers require to suppress the AoC(Advice of Charge) indication.
Disable the charge popup when the roaming is turned ON if
KEY_DISABLE_CHARGE_INDICATION_BOOL carrier config is true.

Test: manual - Checked that the charge popup is not shown after turning
ON roaming with KEY_DISABLE_CHARGE_INDICATION_BOOL is true
Bug: 65036581
Merged-In: I99bd63fce6483617efdc5b90e4805e07a83ffb6c
Change-Id: I99bd63fce6483617efdc5b90e4805e07a83ffb6c
diff --git a/src/com/android/phone/MobileNetworkSettings.java b/src/com/android/phone/MobileNetworkSettings.java
index 5457dd0..4b45fb5 100644
--- a/src/com/android/phone/MobileNetworkSettings.java
+++ b/src/com/android/phone/MobileNetworkSettings.java
@@ -977,12 +977,19 @@
 
                 //normally called on the toggle click
                 if (!mButtonDataRoam.isChecked()) {
-                    // First confirm with a warning dialog about charges
-                    mOkClicked = false;
-                    RoamingDialogFragment fragment = new RoamingDialogFragment();
-                    fragment.show(getFragmentManager(), ROAMING_TAG);
-                    // Don't update the toggle unless the confirm button is actually pressed.
-                    return false;
+                    PersistableBundle carrierConfig =
+                            PhoneGlobals.getInstance().getCarrierConfigForSubId(mPhone.getSubId());
+                    if (carrierConfig != null && carrierConfig.getBoolean(
+                            CarrierConfigManager.KEY_DISABLE_CHARGE_INDICATION_BOOL)) {
+                        mPhone.setDataRoamingEnabled(true);
+                    } else {
+                        // First confirm with a warning dialog about charges
+                        mOkClicked = false;
+                        RoamingDialogFragment fragment = new RoamingDialogFragment();
+                        fragment.show(getFragmentManager(), ROAMING_TAG);
+                        // Don't update the toggle unless the confirm button is actually pressed.
+                        return false;
+                    }
                 } else {
                     mPhone.setDataRoamingEnabled(false);
                 }