Fix CDMA Call Forwarding/Call Waiting UI

The CDMA Call Forwarding and Call Waiting UI was incorrectly
being created in the CallFeaturesSettings. Since Call waiting requires
a TimeConsumingPreferenceListener, it can not be directly added to
the main CallFeaturesSettings activity. It should eventually follow
the GSM pattern (or be refactored to have one UI for both technologies).
This changes the call forwarding/call waiting settings to be under
"Additional Settings" in order to support the Call Waiting Activity.

Bug: 185963699
Test: manual; test UI
Change-Id: I981d9d825ba781b691b610ef741b1b2d01953317
diff --git a/src/com/android/phone/CallFeaturesSetting.java b/src/com/android/phone/CallFeaturesSetting.java
index 09f1072..ec6ea2b 100644
--- a/src/com/android/phone/CallFeaturesSetting.java
+++ b/src/com/android/phone/CallFeaturesSetting.java
@@ -398,7 +398,8 @@
             cdmaOptions.setIntent(mSubscriptionInfoHelper.getIntent(CdmaCallOptions.class));
             gsmOptions.setIntent(mSubscriptionInfoHelper.getIntent(GsmUmtsCallOptions.class));
         } else {
-            prefSet.removePreference(cdmaOptions);
+            // Remove GSM options and repopulate the preferences in this Activity if phone type is
+            // GSM.
             prefSet.removePreference(gsmOptions);
 
             int phoneType = mPhone.getPhoneType();
@@ -406,12 +407,16 @@
                 prefSet.removePreference(fdnButton);
             } else {
                 if (phoneType == PhoneConstants.PHONE_TYPE_CDMA) {
+                    // For now, just keep CdmaCallOptions as one entity. Eventually CDMA should
+                    // follow the same pattern as GSM below, where VP and Call forwarding are
+                    // populated here and Call waiting is populated in another "Additional Settings"
+                    // submenu for CDMA.
                     prefSet.removePreference(fdnButton);
-                    addPreferencesFromResource(R.xml.cdma_call_privacy);
-                    CdmaVoicePrivacySwitchPreference buttonVoicePrivacy =
-                            (CdmaVoicePrivacySwitchPreference) findPreference(BUTTON_VP_KEY);
-                    buttonVoicePrivacy.setPhone(mPhone);
+                    cdmaOptions.setSummary(null);
+                    cdmaOptions.setTitle(R.string.additional_gsm_call_settings);
+                    cdmaOptions.setIntent(mSubscriptionInfoHelper.getIntent(CdmaCallOptions.class));
                 } else if (phoneType == PhoneConstants.PHONE_TYPE_GSM) {
+                    prefSet.removePreference(cdmaOptions);
                     if (mPhone.getIccCard() == null || !mPhone.getIccCard().getIccFdnAvailable()) {
                         prefSet.removePreference(fdnButton);
                     }