From 25237ec70323d72c299dd984117031de432b8e42 Mon Sep 17 00:00:00 2001 From: blunden Date: Sun, 18 Mar 2018 13:47:09 +0100 Subject: Generalize the in-call vibration settings category Rename it to "In-call" and adjust the preference hiding code accordingly. Turn checkboxes into switches for more consistency. Change-Id: If22a58b4f82e3db59373e53da0632c126bd946f4 --- .../android/dialer/app/res/values/cm_strings.xml | 9 +++++++-- .../android/dialer/app/res/xml/sound_settings.xml | 22 +++++++++++----------- .../dialer/app/settings/SoundSettingsFragment.java | 15 ++++++++++++--- 3 files changed, 30 insertions(+), 16 deletions(-) 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 90e648014..ba15b469d 100644 --- a/java/com/android/dialer/app/res/values/cm_strings.xml +++ b/java/com/android/dialer/app/res/values/cm_strings.xml @@ -1,6 +1,7 @@ - dialer_general_incall_vibration_category_key - In-call vibration + dialer_general_incall_category_key + In-call + incall_vibrate_outgoing Vibrate on answer + incall_vibrate_call_waiting Vibrate on call waiting + incall_vibrate_hangup Vibrate on hang up + incall_vibrate_45secs Vibrate every minute Vibrates at the 45 second mark of every minute during outgoing calls 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 c0e78c208..e26e51aad 100644 --- a/java/com/android/dialer/app/res/xml/sound_settings.xml +++ b/java/com/android/dialer/app/res/xml/sound_settings.xml @@ -44,25 +44,25 @@ android:title="@string/dtmf_tone_length_title"/> + android:key="@string/incall_category_key" + android:title="@string/incall_category_title"> - - - - + android:summary="@string/incall_vibrate_45_summary" /> diff --git a/java/com/android/dialer/app/settings/SoundSettingsFragment.java b/java/com/android/dialer/app/settings/SoundSettingsFragment.java index 95f2a09ec..3c254cc4b 100644 --- a/java/com/android/dialer/app/settings/SoundSettingsFragment.java +++ b/java/com/android/dialer/app/settings/SoundSettingsFragment.java @@ -97,10 +97,19 @@ public class SoundSettingsFragment extends PreferenceFragment vibrateWhenRinging.setOnPreferenceChangeListener(this); } else { PreferenceScreen ps = getPreferenceScreen(); - Preference inCallVibration = findPreference( - context.getString(R.string.incall_vibration_category_key)); + 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)); ps.removePreference(vibrateWhenRinging); - ps.removePreference(inCallVibration); + ps.removePreference(inCallVibrateOutgoing); + ps.removePreference(inCallVibrateCallWaiting); + ps.removePreference(inCallVibrateHangup); + ps.removePreference(inCallVibrate45Secs); vibrateWhenRinging = null; } -- cgit v1.2.3