mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-28 02:37:46 +00:00
Canonicalize addresses during import from system SMS database
// FREEBIE
This commit is contained in:
parent
422b4c345b
commit
a80fe178ea
@ -22,6 +22,7 @@ import android.database.sqlite.SQLiteDatabase;
|
||||
import android.database.sqlite.SQLiteException;
|
||||
import android.database.sqlite.SQLiteStatement;
|
||||
import android.net.Uri;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import org.thoughtcrime.securesms.crypto.MasterCipher;
|
||||
@ -100,7 +101,9 @@ public class SmsMigrator {
|
||||
Cursor cursor, long threadId,
|
||||
SQLiteStatement statement)
|
||||
{
|
||||
addStringToStatement(statement, cursor, 1, SmsDatabase.ADDRESS);
|
||||
String theirAddress = cursor.getString(cursor.getColumnIndexOrThrow(SmsDatabase.ADDRESS));
|
||||
statement.bindString(1, Address.fromExternal(context, theirAddress).serialize());
|
||||
|
||||
addIntToStatement(statement, cursor, 2, SmsDatabase.PERSON);
|
||||
addIntToStatement(statement, cursor, 3, SmsDatabase.DATE_RECEIVED);
|
||||
addIntToStatement(statement, cursor, 4, SmsDatabase.DATE_RECEIVED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user