Revert "Generalize the in-call vibration settings category"

This reverts commit c023728f0b6b4ed022bae01dc2714a1bc2848798.

Change-Id: I3c38e053bd8625dddc793a6c655a7735d9f340f5
diff --git a/java/com/android/dialer/app/res/values/cm_strings.xml b/java/com/android/dialer/app/res/values/cm_strings.xml
index 3f7602d..336c820 100644
--- a/java/com/android/dialer/app/res/values/cm_strings.xml
+++ b/java/com/android/dialer/app/res/values/cm_strings.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!--
      Copyright (C) 2013-2014 The CyanogenMod Project
-     Copyright (C) 2018 The LineageOS Project
 
      Licensed under the Apache License, Version 2.0 (the "License");
      you may not use this file except in compliance with the License.
@@ -19,13 +18,11 @@
     <string name="incall_category_key" translatable="false">dialer_general_incall_category_key</string>
     <string name="incall_category_title">In-call</string>
     <string name="incall_enable_dnd_title">Enable Do Not Disturb during calls</string>
-    <string name="incall_vibrate_outgoing_key" translatable="false">incall_vibrate_outgoing</string>
+    <string name="incall_vibration_category_key" translatable="false">dialer_general_incall_vibration_category_key</string>
+    <string name="incall_vibration_category_title">In-call vibration</string>
     <string name="incall_vibrate_outgoing_title">Vibrate on answer</string>
-    <string name="incall_vibrate_call_waiting_key" translatable="false">incall_vibrate_call_waiting</string>
     <string name="incall_vibrate_call_waiting_title">Vibrate on call waiting</string>
-    <string name="incall_vibrate_hangup_key" translatable="false">incall_vibrate_hangup</string>
     <string name="incall_vibrate_hangup_title">Vibrate on hang up</string>
-    <string name="incall_vibrate_45_key" translatable="false">incall_vibrate_45secs</string>
     <string name="incall_vibrate_45_title">Vibrate every minute</string>
     <string name="incall_vibrate_45_summary">Vibrates at the 45 second mark of every minute during outgoing calls</string>
     <string name="incall_dnd_dialog_message">In order to enable Do Not Disturb, the Phone app needs to be granted the permission to control the Do Not Disturb status.\nPlease allow it.</string>
diff --git a/java/com/android/dialer/app/res/xml/sound_settings.xml b/java/com/android/dialer/app/res/xml/sound_settings.xml
index 673ec56..248a7ae 100644
--- a/java/com/android/dialer/app/res/xml/sound_settings.xml
+++ b/java/com/android/dialer/app/res/xml/sound_settings.xml
@@ -44,30 +44,30 @@
     android:title="@string/dtmf_tone_length_title"/>
 
   <PreferenceCategory
-    android:key="@string/incall_category_key"
-    android:title="@string/incall_category_title">
+    android:key="@string/incall_vibration_category_key"
+    android:title="@string/incall_vibration_category_title">
 
     <SwitchPreference
         android:defaultValue="false"
         android:key="incall_enable_dnd"
         android:title="@string/incall_enable_dnd_title"/>
 
-    <SwitchPreference
-      android:key="@string/incall_vibrate_outgoing_key"
+    <CheckBoxPreference
+      android:key="incall_vibrate_outgoing"
       android:title="@string/incall_vibrate_outgoing_title" />
 
-    <SwitchPreference
-      android:key="@string/incall_vibrate_call_waiting_key"
+    <CheckBoxPreference
+      android:key="incall_vibrate_call_waiting"
       android:title="@string/incall_vibrate_call_waiting_title" />
 
-    <SwitchPreference
-      android:key="@string/incall_vibrate_hangup_key"
+    <CheckBoxPreference
+      android:key="incall_vibrate_hangup"
       android:title="@string/incall_vibrate_hangup_title" />
 
-    <SwitchPreference
-      android:key="@string/incall_vibrate_45_key"
+    <CheckBoxPreference
+      android:key="incall_vibrate_45secs"
       android:title="@string/incall_vibrate_45_title"
-      android:summary="@string/incall_vibrate_45_summary" />
+     android:summary="@string/incall_vibrate_45_summary" />
 
   </PreferenceCategory>
 
diff --git a/java/com/android/dialer/app/settings/SoundSettingsFragment.java b/java/com/android/dialer/app/settings/SoundSettingsFragment.java
index f7fc0d0..8afffd4 100644
--- a/java/com/android/dialer/app/settings/SoundSettingsFragment.java
+++ b/java/com/android/dialer/app/settings/SoundSettingsFragment.java
@@ -106,19 +106,10 @@
       vibrateWhenRinging.setOnPreferenceChangeListener(this);
     } else {
       PreferenceScreen ps = getPreferenceScreen();
-      Preference inCallVibrateOutgoing = findPreference(
-          context.getString(R.string.incall_vibrate_outgoing_key));
-      Preference inCallVibrateCallWaiting = findPreference(
-          context.getString(R.string.incall_vibrate_call_waiting_key));
-      Preference inCallVibrateHangup = findPreference(
-          context.getString(R.string.incall_vibrate_hangup_key));
-      Preference inCallVibrate45Secs = findPreference(
-          context.getString(R.string.incall_vibrate_45_key));
+      Preference inCallVibration = findPreference(
+          context.getString(R.string.incall_vibration_category_key));
       ps.removePreference(vibrateWhenRinging);
-      ps.removePreference(inCallVibrateOutgoing);
-      ps.removePreference(inCallVibrateCallWaiting);
-      ps.removePreference(inCallVibrateHangup);
-      ps.removePreference(inCallVibrate45Secs);
+      ps.removePreference(inCallVibration);
       vibrateWhenRinging = null;
     }