Fix crash in SmsMigrator.
This commit is contained in:
parent
d7395af774
commit
84012c7adb
1 changed files with 3 additions and 2 deletions
|
@ -183,9 +183,10 @@ public class SmsMigrator {
|
|||
statement = ourSmsDatabase.createInsertStatement(transaction);
|
||||
|
||||
while (cursor != null && cursor.moveToNext()) {
|
||||
int typeColumn = cursor.getColumnIndex(SmsDatabase.TYPE);
|
||||
int addressColumn = cursor.getColumnIndexOrThrow(SystemColumns.ADDRESS);
|
||||
int typeColumn = cursor.getColumnIndex(SmsDatabase.TYPE);
|
||||
|
||||
if (cursor.isNull(typeColumn) || isAppropriateTypeForMigration(cursor, typeColumn)) {
|
||||
if (!cursor.isNull(addressColumn) && (cursor.isNull(typeColumn) || isAppropriateTypeForMigration(cursor, typeColumn))) {
|
||||
getContentValuesForRow(context, cursor, ourThreadId, statement);
|
||||
statement.execute();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue