Fix context leak from lingering RecipientModifiedListener.

Because ContactSelectionListItem is used as a
RecipientModifiedListener, it leaks its context
(NewConversationActivity/PushContactSelectionActivity),
which can lead to OOM crashes.

Closes #3214
// FREEBIE
This commit is contained in:
Michael Herbig 2015-05-21 01:15:48 -04:00 committed by Moxie Marlinspike
parent 7ecc58095b
commit 18436dc3be

View File

@ -107,6 +107,7 @@ public class ContactSelectionListItem extends RelativeLayout implements Recipien
@Override
public void onModified(final Recipient recipient) {
if (this.recipient == recipient) {
recipient.removeListener(this);
this.contactPhotoImage.post(new Runnable() {
@Override
public void run() {