do not use writeAheadLogging and custom executor at the Room database

This commit is contained in:
tibbi 2018-11-19 16:54:34 +01:00
parent e3b0caa577
commit e976c72cd9
2 changed files with 0 additions and 10 deletions

View File

@ -14,7 +14,6 @@ import com.simplemobiletools.contacts.pro.interfaces.ContactsDao
import com.simplemobiletools.contacts.pro.interfaces.GroupsDao
import com.simplemobiletools.contacts.pro.models.Group
import com.simplemobiletools.contacts.pro.models.LocalContact
import com.simplemobiletools.contacts.pro.objects.MyExecutor
import java.util.concurrent.Executors
@Database(entities = [LocalContact::class, Group::class], version = 1)
@ -33,7 +32,6 @@ abstract class ContactsDatabase : RoomDatabase() {
synchronized(ContactsDatabase::class) {
if (db == null) {
db = Room.databaseBuilder(context.applicationContext, ContactsDatabase::class.java, "local_contacts.db")
.setQueryExecutor(MyExecutor.myExecutor)
.addCallback(object : Callback() {
override fun onCreate(db: SupportSQLiteDatabase) {
super.onCreate(db)
@ -41,7 +39,6 @@ abstract class ContactsDatabase : RoomDatabase() {
}
})
.build()
db!!.openHelper.setWriteAheadLoggingEnabled(true)
}
}
}

View File

@ -1,7 +0,0 @@
package com.simplemobiletools.contacts.pro.objects
import java.util.concurrent.Executors
object MyExecutor {
val myExecutor = Executors.newSingleThreadExecutor()
}