Remove Recipients listener when pref fragment is destroyed.

Fixes #3434
// FREEBIE
This commit is contained in:
Moxie Marlinspike 2015-06-22 18:18:06 -07:00
parent fd2fe9ebd7
commit a7f63ed9a3

View File

@ -164,6 +164,11 @@ public class RecipientPreferenceActivity extends PassphraseRequiredActionBarActi
setSummaries(recipients);
}
@Override
public void onDestroy() {
this.recipients.removeListener(this);
}
private void setSummaries(Recipients recipients) {
CheckBoxPreference mutePreference = (CheckBoxPreference) this.findPreference(PREFERENCE_MUTED);
RingtonePreference ringtonePreference = (RingtonePreference) this.findPreference(PREFERENCE_TONE);