|
|
@ -12,7 +12,6 @@ import android.os.Handler;
|
|
|
|
import android.preference.CheckBoxPreference;
|
|
|
|
import android.preference.CheckBoxPreference;
|
|
|
|
import android.preference.ListPreference;
|
|
|
|
import android.preference.ListPreference;
|
|
|
|
import android.preference.Preference;
|
|
|
|
import android.preference.Preference;
|
|
|
|
import android.preference.RingtonePreference;
|
|
|
|
|
|
|
|
import android.provider.Settings;
|
|
|
|
import android.provider.Settings;
|
|
|
|
import android.support.annotation.NonNull;
|
|
|
|
import android.support.annotation.NonNull;
|
|
|
|
import android.support.v4.app.Fragment;
|
|
|
|
import android.support.v4.app.Fragment;
|
|
|
@ -31,6 +30,7 @@ import org.thoughtcrime.securesms.components.AvatarImageView;
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|
|
|
import org.thoughtcrime.securesms.crypto.MasterSecret;
|
|
|
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
|
|
|
import org.thoughtcrime.securesms.database.DatabaseFactory;
|
|
|
|
import org.thoughtcrime.securesms.database.RecipientPreferenceDatabase.VibrateState;
|
|
|
|
import org.thoughtcrime.securesms.database.RecipientPreferenceDatabase.VibrateState;
|
|
|
|
|
|
|
|
import org.thoughtcrime.securesms.preferences.AdvancedRingtonePreference;
|
|
|
|
import org.thoughtcrime.securesms.preferences.ColorPreference;
|
|
|
|
import org.thoughtcrime.securesms.preferences.ColorPreference;
|
|
|
|
import org.thoughtcrime.securesms.recipients.RecipientFactory;
|
|
|
|
import org.thoughtcrime.securesms.recipients.RecipientFactory;
|
|
|
|
import org.thoughtcrime.securesms.recipients.Recipients;
|
|
|
|
import org.thoughtcrime.securesms.recipients.Recipients;
|
|
|
@ -184,11 +184,11 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private void setSummaries(Recipients recipients) {
|
|
|
|
private void setSummaries(Recipients recipients) {
|
|
|
|
CheckBoxPreference mutePreference = (CheckBoxPreference) this.findPreference(PREFERENCE_MUTED);
|
|
|
|
CheckBoxPreference mutePreference = (CheckBoxPreference) this.findPreference(PREFERENCE_MUTED);
|
|
|
|
RingtonePreference ringtonePreference = (RingtonePreference) this.findPreference(PREFERENCE_TONE);
|
|
|
|
AdvancedRingtonePreference ringtonePreference = (AdvancedRingtonePreference) this.findPreference(PREFERENCE_TONE);
|
|
|
|
ListPreference vibratePreference = (ListPreference) this.findPreference(PREFERENCE_VIBRATE);
|
|
|
|
ListPreference vibratePreference = (ListPreference) this.findPreference(PREFERENCE_VIBRATE);
|
|
|
|
ColorPreference colorPreference = (ColorPreference) this.findPreference(PREFERENCE_COLOR);
|
|
|
|
ColorPreference colorPreference = (ColorPreference) this.findPreference(PREFERENCE_COLOR);
|
|
|
|
Preference blockPreference = this.findPreference(PREFERENCE_BLOCK);
|
|
|
|
Preference blockPreference = this.findPreference(PREFERENCE_BLOCK);
|
|
|
|
|
|
|
|
|
|
|
|
mutePreference.setChecked(recipients.isMuted());
|
|
|
|
mutePreference.setChecked(recipients.isMuted());
|
|
|
|
|
|
|
|
|
|
|
@ -197,6 +197,7 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
|
|
|
|
|
|
|
|
|
|
|
|
if (tone != null) {
|
|
|
|
if (tone != null) {
|
|
|
|
ringtonePreference.setSummary(tone.getTitle(getActivity()));
|
|
|
|
ringtonePreference.setSummary(tone.getTitle(getActivity()));
|
|
|
|
|
|
|
|
ringtonePreference.setCurrentRingtone(recipients.getRingtone());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
ringtonePreference.setSummary(R.string.preferences__default);
|
|
|
|
ringtonePreference.setSummary(R.string.preferences__default);
|
|
|
|