Add key to CarrierConfig

Add RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION and default value
(false) to CarrierConfigManager, and remove the old configs.

This value exists because:
http://b/10131736, requires radio restart.
http://b/16308209, http://b/17567651 require that we do not restart.

Merged-In: I4e199d7fe73b82fa39475f31825e5b8ae58d180f

Bug: 29873049
Change-Id: Ie9f8665ff40e2082cf92aa8b4dc337c5ea2ea974
diff --git a/core/res/res/values-mcc310-mnc410/config.xml b/core/res/res/values-mcc310-mnc410/config.xml
index cddd5e3..9accdf0 100644
--- a/core/res/res/values-mcc310-mnc410/config.xml
+++ b/core/res/res/values-mcc310-mnc410/config.xml
@@ -67,7 +67,4 @@
         <item>"#8"</item>
         <item>"#9"</item>
     </string-array>
-    <!-- Flag indicating whether radio is to be restarted on the error of
-         PDP_FAIL_REGULAR_DEACTIVATION/0x24 -->
-    <bool name="config_restart_radio_on_pdp_fail_regular_deactivation">true</bool>
 </resources>
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
index 05d9a28..44cbc0f 100644
--- a/core/res/res/values/config.xml
+++ b/core/res/res/values/config.xml
@@ -2220,10 +2220,6 @@
     <string-array translatable="false" name="dial_string_replace">
     </string-array>
 
-    <!-- Flag indicating whether radio is to be restarted on the error of
-         PDP_FAIL_REGULAR_DEACTIVATION/0x24 -->
-    <bool name="config_restart_radio_on_pdp_fail_regular_deactivation">false</bool>
-
     <!-- networks that don't want data deactivate when shutdown the phone
          note this is dependent on the operator of the network we're on,
          not operator on the SIM -->
diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml
index 5018e2f..206a910 100644
--- a/core/res/res/values/symbols.xml
+++ b/core/res/res/values/symbols.xml
@@ -2240,7 +2240,6 @@
   <java-symbol type="attr" name="windowBackgroundFallback" />
   <java-symbol type="id" name="textSpacerNoButtons" />
   <java-symbol type="array" name="dial_string_replace" />
-  <java-symbol type="bool" name="config_restart_radio_on_pdp_fail_regular_deactivation" />
   <java-symbol type="array" name="networks_not_clear_data" />
   <java-symbol type="bool" name="config_switch_phone_on_voice_reg_state_change" />
   <java-symbol type="string" name="whichHomeApplicationNamed" />
diff --git a/telephony/java/android/telephony/CarrierConfigManager.java b/telephony/java/android/telephony/CarrierConfigManager.java
index ff7ca62..6eb792b 100644
--- a/telephony/java/android/telephony/CarrierConfigManager.java
+++ b/telephony/java/android/telephony/CarrierConfigManager.java
@@ -86,6 +86,15 @@
             KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL = "require_entitlement_checks_bool";
 
     /**
+     * Flag indicating whether radio is to be restarted on error PDP_FAIL_REGULAR_DEACTIVATION
+     * This is false by default.
+     * @hide
+     */
+    public static final String
+            KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL =
+                    "restart_radio_on_pdp_fail_regular_deactivation_bool";
+
+    /**
      * If true, enable vibration (haptic feedback) for key presses in the EmergencyDialer activity.
      * The pattern is set on a per-platform basis using config_virtualKeyVibePattern. To be
      * consistent with the regular Dialer, this value should agree with the corresponding values
@@ -768,6 +777,7 @@
         sDefaults.putBoolean(KEY_VOICE_PRIVACY_DISABLE_UI_BOOL, false);
         sDefaults.putBoolean(KEY_WORLD_PHONE_BOOL, false);
         sDefaults.putBoolean(KEY_REQUIRE_ENTITLEMENT_CHECKS_BOOL, true);
+        sDefaults.putBoolean(KEY_RESTART_RADIO_ON_PDP_FAIL_REGULAR_DEACTIVATION_BOOL, false);
         sDefaults.putInt(KEY_VOLTE_REPLACEMENT_RAT_INT, 0);
         sDefaults.putString(KEY_DEFAULT_SIM_CALL_MANAGER_STRING, "");
         sDefaults.putString(KEY_VVM_DESTINATION_NUMBER_STRING, "");