Hard-code migration for full-text search.

This commit is contained in:
Greyson Parrelli 2018-07-02 18:10:11 -07:00
parent 8be0fd0867
commit 67407ec667

View File

@ -198,14 +198,12 @@ public class SQLCipherOpenHelper extends SQLiteOpenHelper {
Log.i(TAG, "Beginning to build search index."); Log.i(TAG, "Beginning to build search index.");
long start = SystemClock.elapsedRealtime(); long start = SystemClock.elapsedRealtime();
db.execSQL("INSERT INTO " + SearchDatabase.SMS_FTS_TABLE_NAME + " (rowid, " + SearchDatabase.BODY + ") " + db.execSQL("INSERT INTO sms_fts (rowid, body) SELECT _id, body FROM sms");
"SELECT " + SmsDatabase.ID + " , " + SmsDatabase.BODY + " FROM " + SmsDatabase.TABLE_NAME);
long smsFinished = SystemClock.elapsedRealtime(); long smsFinished = SystemClock.elapsedRealtime();
Log.i(TAG, "Indexing SMS completed in " + (smsFinished - start) + " ms"); Log.i(TAG, "Indexing SMS completed in " + (smsFinished - start) + " ms");
db.execSQL("INSERT INTO " + SearchDatabase.MMS_FTS_TABLE_NAME + " (rowid, " + SearchDatabase.BODY + ") " + db.execSQL("INSERT INTO mms_fts (rowid, body) SELECT _id, body FROM mms");
"SELECT " + MmsDatabase.ID + " , " + MmsDatabase.BODY + " FROM " + MmsDatabase.TABLE_NAME);
long mmsFinished = SystemClock.elapsedRealtime(); long mmsFinished = SystemClock.elapsedRealtime();
Log.i(TAG, "Indexing MMS completed in " + (mmsFinished - smsFinished) + " ms"); Log.i(TAG, "Indexing MMS completed in " + (mmsFinished - smsFinished) + " ms");