Under the hood there remain three axes:
1. Are we in silent mode now? | RINGER_MODE_{VIBRATE,SILENT}
2. Do we vibrate in silent mode? | VIBRATE_IN_SILENT == 1
3. Do calls vibrate: | getVibrateSetting(VIBRATE_TYPE_RINGER)
- always | == VIBRATE_SETTING_ON
- never | == VIBRATE_SETTING_OFF
- only in silent | == VIBRATE_SETTING_ONLY_SILENT
We now expose this to the user much more simply by
collapsing (2) and (3) above, and discarding states that
don't make sense:
- VIBRATE_SETTING_OFF + VIBRATE_IN_SILENT
- VIBRATE_SETTING_ONLY_SILENT + !VIBRATE_IN_SILENT
Now we offer the user four choices:
Phone vibrate:
* "Never"
--> VIBRATE_IN_SILENT=0, VIBRATE_SETTING_OFF
* "Always"
--> VIBRATE_IN_SILENT=1, VIBRATE_SETTING_ON
* "Only in silent mode"
--> VIBRATE_IN_SILENT=1, VIBRATE_SETTING_ONLY_SILENT
* "Only when not in silent mode"
--> VIBRATE_IN_SILENT=0, VIBRATE_SETTING_ON
This should make it easier to choose exactly the behavior
the user wants as well as avoid nonsensical combinations of
settings.
Bug: 2598014
Change-Id: I9244d25ec97a3e2b572b71b521049debd22fa4e0
137 lines
5.4 KiB
XML
137 lines
5.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2008 The Android Open Source 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.
|
|
-->
|
|
|
|
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:title="@string/sound_settings"
|
|
android:key="sound_settings"
|
|
xmlns:settings="http://schemas.android.com/apk/res/com.android.settings">
|
|
|
|
<PreferenceCategory
|
|
android:title="@string/sound_category_sound_title"
|
|
>
|
|
|
|
<CheckBoxPreference
|
|
android:key="silent"
|
|
android:title="@string/silent_mode_title"
|
|
android:summary="@string/silent_mode_summary"
|
|
android:persistent="false"
|
|
android:order="1"
|
|
android:disableDependentsState="true" />
|
|
|
|
<ListPreference
|
|
android:key="vibrate"
|
|
android:order="6"
|
|
android:title="@string/vibrate_title"
|
|
android:summary="@string/vibrate_summary"
|
|
android:entries="@array/vibrate_entries"
|
|
android:entryValues="@array/vibrate_values" />
|
|
|
|
<com.android.settings.RingerVolumePreference
|
|
android:key="ring_volume"
|
|
android:dependency="silent"
|
|
android:title="@string/all_volume_title"
|
|
android:summary="@string/ring_volume_summary"
|
|
android:dialogTitle="@string/all_volume_title"
|
|
android:persistent="false"
|
|
android:order="3"
|
|
android:streamType="ring" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:title="@string/sound_category_calls_title"
|
|
>
|
|
|
|
<com.android.settings.DefaultRingtonePreference
|
|
android:key="ringtone"
|
|
android:title="@string/ringtone_title"
|
|
android:summary="@string/ringtone_summary"
|
|
android:dialogTitle="@string/ringtone_title"
|
|
android:persistent="false"
|
|
android:order="5"
|
|
android:ringtoneType="ringtone" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:title="@string/sound_category_notification_title"
|
|
>
|
|
|
|
<com.android.settings.DefaultRingtonePreference
|
|
android:key="notification_sound"
|
|
android:title="@string/notification_sound_title"
|
|
android:summary="@string/notification_sound_summary"
|
|
android:dialogTitle="@string/notification_sound_dialog_title"
|
|
android:persistent="false"
|
|
android:order="7"
|
|
android:ringtoneType="notification" />
|
|
|
|
<CheckBoxPreference
|
|
android:key="notification_pulse"
|
|
android:title="@string/notification_pulse_title"
|
|
android:summary="@string/notification_pulse_summary"
|
|
android:order="8"
|
|
android:persistent="false" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
<PreferenceCategory
|
|
android:title="@string/sound_category_feedback_title"
|
|
>
|
|
|
|
<CheckBoxPreference
|
|
android:key="dtmf_tone"
|
|
android:title="@string/dtmf_tone_enable_title"
|
|
android:summaryOn="@string/dtmf_tone_enable_summary_on"
|
|
android:summaryOff="@string/dtmf_tone_enable_summary_off"
|
|
android:order="9"
|
|
android:defaultValue="true" />
|
|
|
|
<CheckBoxPreference
|
|
android:key="sound_effects"
|
|
android:title="@string/sound_effects_enable_title"
|
|
android:summaryOn="@string/sound_effects_enable_summary_on"
|
|
android:summaryOff="@string/sound_effects_enable_summary_off"
|
|
android:order="10"
|
|
android:defaultValue="true" />
|
|
|
|
<CheckBoxPreference
|
|
android:key="lock_sounds"
|
|
android:title="@string/lock_sounds_enable_title"
|
|
android:summaryOn="@string/lock_sounds_enable_summary_on"
|
|
android:summaryOff="@string/lock_sounds_enable_summary_off"
|
|
android:order="11"
|
|
android:defaultValue="true" />
|
|
|
|
<CheckBoxPreference
|
|
android:key="haptic_feedback"
|
|
android:title="@string/haptic_feedback_enable_title"
|
|
android:summaryOn="@string/haptic_feedback_enable_summary_on"
|
|
android:summaryOff="@string/haptic_feedback_enable_summary_off"
|
|
android:order="12"
|
|
android:defaultValue="true" />
|
|
|
|
<ListPreference
|
|
android:key="emergency_tone"
|
|
android:title="@string/emergency_tone_title"
|
|
android:summary="@string/emergency_tone_summary"
|
|
android:entries="@array/emergency_tone_entries"
|
|
android:entryValues="@array/emergency_tone_values" />
|
|
|
|
</PreferenceCategory>
|
|
|
|
</PreferenceScreen>
|