mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-20 08:39:22 +01:00
Fix some issues with restoring old backups.
There's a bug where if you restore a database with a different column definition order than a new install, then column indexes in cursors could be wrong. Closing and re-opening the database fixes this. I also removed a reference to a possibly-closed database we were holding onto in LiveRecipient.
This commit is contained in:
committed by
Cody Henthorne
parent
44fa42fca4
commit
ff038e3ade
@@ -237,6 +237,9 @@ open class SignalDatabase(private val context: Application, databaseSecret: Data
|
||||
instance!!.rawWritableDatabase.execSQL("DROP TABLE IF EXISTS job_spec")
|
||||
instance!!.rawWritableDatabase.execSQL("DROP TABLE IF EXISTS constraint_spec")
|
||||
instance!!.rawWritableDatabase.execSQL("DROP TABLE IF EXISTS dependency_spec")
|
||||
|
||||
instance!!.rawWritableDatabase.close()
|
||||
triggerDatabaseAccess()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user