Better UX handling on identity key mismatches.

1) Migrate from GSON to Jackson everywhere.

2) Add support for storing identity key conflicts on message rows.

3) Add limited support for surfacing identity key conflicts in UI.
This commit is contained in:
Moxie Marlinspike
2015-01-15 13:35:35 -08:00
parent 4397b55ceb
commit 00d7b5c284
76 changed files with 2395 additions and 721 deletions

View File

@@ -0,0 +1,58 @@
package org.thoughtcrime.securesms;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AbsListView;
import android.widget.BaseAdapter;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.database.model.MessageRecord;
import org.thoughtcrime.securesms.recipients.Recipients;
public class MessageDetailsRecipientAdapter extends BaseAdapter implements AbsListView.RecyclerListener {
private Context context;
private MasterSecret masterSecret;
private MessageRecord record;
private Recipients recipients;
public MessageDetailsRecipientAdapter(Context context, MasterSecret masterSecret, MessageRecord record, Recipients recipients) {
this.context = context;
this.masterSecret = masterSecret;
this.record = record;
this.recipients = recipients;
}
@Override
public int getCount() {
return recipients.getRecipientsList().size();
}
@Override
public Object getItem(int position) {
return recipients.getRecipientsList().get(position);
}
@Override
public long getItemId(int position) {
return recipients.getRecipientsList().get(position).getRecipientId();
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
if (convertView == null) {
convertView = LayoutInflater.from(context).inflate(R.layout.message_details_recipient, parent, false);
}
((MessageRecipientListItem)convertView).set(masterSecret, record, recipients, position);
return convertView;
}
@Override
public void onMovedToScrapHeap(View view) {
((MessageRecipientListItem)view).unbind();
}
}