|
|
|
@ -387,6 +387,7 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|
|
|
|
if (oldVersion < SELF_ATTACHMENT_CLEANUP) {
|
|
|
|
|
String localNumber = TextSecurePreferences.getLocalNumber(context);
|
|
|
|
|
|
|
|
|
|
if (!TextUtils.isEmpty(localNumber)) {
|
|
|
|
|
try (Cursor threadCursor = db.rawQuery("SELECT _id FROM thread WHERE recipient_ids = ?", new String[]{ localNumber })) {
|
|
|
|
|
if (threadCursor != null && threadCursor.moveToFirst()) {
|
|
|
|
|
long threadId = threadCursor.getLong(0);
|
|
|
|
@ -399,6 +400,7 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
db.setTransactionSuccessful();
|
|
|
|
|
} finally {
|
|
|
|
|