Support for custom call ringtone selection and per-chat ringtones

This commit is contained in:
Moxie Marlinspike
2018-02-16 11:10:35 -08:00
parent 35a6ec707f
commit 71c7ef5b5e
15 changed files with 408 additions and 125 deletions

View File

@@ -71,6 +71,30 @@
<PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/preferences_notifications__calls">
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:key="pref_call_notifications"
android:title="@string/preferences__notifications"
android:defaultValue="true" />
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:dependency="pref_call_notifications"
android:key="pref_call_ringtone"
android:title="@string/preferences_notifications__ringtone"
android:persistent="false"
android:defaultValue="content://settings/system/ringtone" />
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:dependency="pref_call_notifications"
android:key="pref_call_vibrate"
android:defaultValue="true"
android:title="@string/preferences__vibrate"/>
</PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/preferences_notifications__events">
<org.thoughtcrime.securesms.components.SwitchPreferenceCompat
android:key="pref_enable_new_contacts_notifications"

View File

@@ -35,6 +35,25 @@
app:numColumns="5" />
</PreferenceCategory>
<PreferenceCategory android:layout="@layout/preference_divider"/>
<PreferenceCategory android:title="@string/recipient_preferences__call_settings">
<org.thoughtcrime.securesms.preferences.widgets.SignalPreference
android:key="pref_key_recipient_call_ringtone"
android:title="@string/recipient_preferences__ringtone"
android:persistent="false"/>
<org.thoughtcrime.securesms.preferences.widgets.SignalListPreference
android:key="pref_key_recipient_call_vibrate"
android:title="@string/recipient_preferences__vibrate"
android:entries="@array/recipient_vibrate_entries"
android:entryValues="@array/recipient_vibrate_values"
android:defaultValue="0"
android:persistent="false"/>
</PreferenceCategory>
<PreferenceCategory android:key="divider" android:layout="@layout/preference_divider"/>
<PreferenceCategory android:key="privacy_settings" android:title="@string/recipient_preferences__privacy">