Attempt to open db as read-write during error recovery.

Relates to #13034
This commit is contained in:
Greyson Parrelli
2023-09-05 09:29:42 -04:00
committed by Nicholas Tinsley
parent bfc8b199b6
commit 3f1d3149e9

View File

@@ -151,6 +151,11 @@ class SqlCipherErrorHandler(private val databaseName: String) : DatabaseErrorHan
private fun attemptToClearFullTextSearchIndex(db: SQLiteDatabase) {
try {
try {
db.reopenReadWrite()
} catch (e: Exception) {
Log.w(TAG, "Failed to re-open as read-write!", e)
}
SignalDatabase.messageSearch.fullyResetTables(db)
} catch (e: Throwable) {
Log.w(TAG, "Failed to clear full text search index.", e)