Migrate from SQLite and ciphertext blobs to SQLCipher + KeyStore

This commit is contained in:
Moxie Marlinspike
2018-01-24 19:17:44 -08:00
parent d1819b6361
commit f36b296e2e
134 changed files with 3633 additions and 3544 deletions

View File

@@ -15,7 +15,6 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import org.thoughtcrime.securesms.crypto.IdentityKeyParcelable;
import org.thoughtcrime.securesms.crypto.MasterSecret;
import org.thoughtcrime.securesms.database.IdentityDatabase;
import org.thoughtcrime.securesms.database.IdentityDatabase.IdentityRecord;
import org.thoughtcrime.securesms.database.model.MessageRecord;
@@ -38,7 +37,6 @@ public class ConversationUpdateItem extends LinearLayout
{
private static final String TAG = ConversationUpdateItem.class.getSimpleName();
private MasterSecret masterSecret;
private Set<MessageRecord> batchSelected;
private ImageView icon;
@@ -60,22 +58,20 @@ public class ConversationUpdateItem extends LinearLayout
public void onFinishInflate() {
super.onFinishInflate();
this.icon = (ImageView)findViewById(R.id.conversation_update_icon);
this.body = (TextView)findViewById(R.id.conversation_update_body);
this.date = (TextView)findViewById(R.id.conversation_update_date);
this.icon = findViewById(R.id.conversation_update_icon);
this.body = findViewById(R.id.conversation_update_body);
this.date = findViewById(R.id.conversation_update_date);
this.setOnClickListener(new InternalClickListener(null));
}
@Override
public void bind(@NonNull MasterSecret masterSecret,
@NonNull MessageRecord messageRecord,
public void bind(@NonNull MessageRecord messageRecord,
@NonNull GlideRequests glideRequests,
@NonNull Locale locale,
@NonNull Set<MessageRecord> batchSelected,
@NonNull Recipient conversationRecipient)
{
this.masterSecret = masterSecret;
this.batchSelected = batchSelected;
bind(messageRecord, locale);
@@ -172,12 +168,7 @@ public class ConversationUpdateItem extends LinearLayout
@Override
public void onModified(Recipient recipient) {
Util.runOnMain(new Runnable() {
@Override
public void run() {
bind(messageRecord, locale);
}
});
Util.runOnMain(() -> bind(messageRecord, locale));
}
@Override
@@ -196,7 +187,7 @@ public class ConversationUpdateItem extends LinearLayout
@Nullable private final View.OnClickListener parent;
public InternalClickListener(@Nullable View.OnClickListener parent) {
InternalClickListener(@Nullable View.OnClickListener parent) {
this.parent = parent;
}