Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DB concurrency is tricky in Android. The following changes allow a better handling of multithreaded db access: - Write ahead logging is enabled - Connection is configured in onConfigure (SQLiteOpenHelper) - Transactions are made in non-exclusive mode References: - http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#enableWriteAheadLogging() - http://developer.android.com/reference/android/database/sqlite/SQLiteOpenHelper.html#onConfigure(android.database.sqlite.SQLiteDatabase) - http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.0.1_r1/android/database/sqlite/SQLiteDatabase.java#SQLiteDatabase.beginTransaction%28android.database.sqlite.SQLiteTransactionListener%2Cboolean%29 - https://www.sqlite.org/lockingv3.html#reserved_lock - https://www.sqlite.org/lang_transaction.html - http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#beginTransactionNonExclusive()
- Loading branch information