Dialer: Add back in-call vibration features
Fix call tracking.
getActiveCall() can return null when ending calls locally before they
are answered locally, so better use the presence of an active call as
indicator of whether to do the vibration instead of using the state.
Change-Id: I088cd743c9a9e6704e93f8c48fb566b3a20ca8be
diff --git a/res/xml/sound_settings.xml b/res/xml/sound_settings.xml
index 80fad62..a1170ad 100644
--- a/res/xml/sound_settings.xml
+++ b/res/xml/sound_settings.xml
@@ -25,13 +25,13 @@
android:persistent="false"
android:ringtoneType="ringtone" />
- <CheckBoxPreference
+ <SwitchPreference
android:key="@string/vibrate_on_preference_key"
android:title="@string/vibrate_on_ring_title"
android:persistent="false"
android:defaultValue="false" />
- <CheckBoxPreference
+ <SwitchPreference
android:key="@string/play_dtmf_preference_key"
android:title="@string/dtmf_tone_enable_title"
android:persistent="false"
@@ -43,4 +43,23 @@
android:entries="@array/dtmf_tone_length_entries"
android:entryValues="@array/dtmf_tone_length_entry_values" />
+ <PreferenceCategory
+ android:key="dialer_general_incall_vibration_category_key"
+ android:title="@string/incall_vibration_category_title">
+
+ <SwitchPreference
+ android:key="incall_vibrate_outgoing"
+ android:title="@string/incall_vibrate_outgoing_title" />
+
+ <SwitchPreference
+ android:key="incall_vibrate_hangup"
+ android:title="@string/incall_vibrate_hangup_title" />
+
+ <SwitchPreference
+ android:key="incall_vibrate_45secs"
+ android:title="@string/incall_vibrate_45_title"
+ android:summary="@string/incall_vibrate_45_summary" />
+
+ </PreferenceCategory>
+
</PreferenceScreen>