diff options
Diffstat (limited to 'java/com/android/dialer')
3 files changed, 53 insertions, 1 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 new file mode 100644 index 000000000..90e648014 --- /dev/null +++ b/java/com/android/dialer/app/res/values/cm_strings.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2013-2014 The CyanogenMod Project + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <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_title">Vibrate on call waiting</string> + <string name="incall_vibrate_hangup_title">Vibrate on hang up</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> +</resources> 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 d9afb7411..c0e78c208 100644 --- a/java/com/android/dialer/app/res/xml/sound_settings.xml +++ b/java/com/android/dialer/app/res/xml/sound_settings.xml @@ -43,4 +43,27 @@ android:key="@string/dtmf_tone_length_preference_key" android:title="@string/dtmf_tone_length_title"/> + <PreferenceCategory + android:key="@string/incall_vibration_category_key" + android:title="@string/incall_vibration_category_title"> + + <CheckBoxPreference + android:key="incall_vibrate_outgoing" + android:title="@string/incall_vibrate_outgoing_title" /> + + <CheckBoxPreference + android:key="incall_vibrate_call_waiting" + android:title="@string/incall_vibrate_call_waiting_title" /> + + <CheckBoxPreference + android:key="incall_vibrate_hangup" + android:title="@string/incall_vibrate_hangup_title" /> + + <CheckBoxPreference + android:key="incall_vibrate_45secs" + android:title="@string/incall_vibrate_45_title" + android:summary="@string/incall_vibrate_45_summary" /> + + </PreferenceCategory> + </PreferenceScreen> diff --git a/java/com/android/dialer/app/settings/SoundSettingsFragment.java b/java/com/android/dialer/app/settings/SoundSettingsFragment.java index 9d564416c..95f2a09ec 100644 --- a/java/com/android/dialer/app/settings/SoundSettingsFragment.java +++ b/java/com/android/dialer/app/settings/SoundSettingsFragment.java @@ -96,7 +96,11 @@ public class SoundSettingsFragment extends PreferenceFragment if (hasVibrator()) { vibrateWhenRinging.setOnPreferenceChangeListener(this); } else { - getPreferenceScreen().removePreference(vibrateWhenRinging); + PreferenceScreen ps = getPreferenceScreen(); + Preference inCallVibration = findPreference( + context.getString(R.string.incall_vibration_category_key)); + ps.removePreference(vibrateWhenRinging); + ps.removePreference(inCallVibration); vibrateWhenRinging = null; } |