mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-23 04:57:59 +01:00
disable Room db writeAheadLogging and custom query executor
This commit is contained in:
parent
4cbbca9f54
commit
0b8e958d01
2 changed files with 0 additions and 10 deletions
|
@ -8,7 +8,6 @@ import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
|
||||||
import com.simplemobiletools.gallery.pro.interfaces.MediumDao
|
import com.simplemobiletools.gallery.pro.interfaces.MediumDao
|
||||||
import com.simplemobiletools.gallery.pro.models.Directory
|
import com.simplemobiletools.gallery.pro.models.Directory
|
||||||
import com.simplemobiletools.gallery.pro.models.Medium
|
import com.simplemobiletools.gallery.pro.models.Medium
|
||||||
import com.simplemobiletools.gallery.pro.objects.MyExecutor
|
|
||||||
|
|
||||||
@Database(entities = [Directory::class, Medium::class], version = 4)
|
@Database(entities = [Directory::class, Medium::class], version = 4)
|
||||||
abstract class GalleryDatabase : RoomDatabase() {
|
abstract class GalleryDatabase : RoomDatabase() {
|
||||||
|
@ -26,9 +25,7 @@ abstract class GalleryDatabase : RoomDatabase() {
|
||||||
if (db == null) {
|
if (db == null) {
|
||||||
db = Room.databaseBuilder(context.applicationContext, GalleryDatabase::class.java, "gallery.db")
|
db = Room.databaseBuilder(context.applicationContext, GalleryDatabase::class.java, "gallery.db")
|
||||||
.fallbackToDestructiveMigration()
|
.fallbackToDestructiveMigration()
|
||||||
.setQueryExecutor(MyExecutor.myExecutor)
|
|
||||||
.build()
|
.build()
|
||||||
db!!.openHelper.setWriteAheadLoggingEnabled(true)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
package com.simplemobiletools.gallery.pro.objects
|
|
||||||
|
|
||||||
import java.util.concurrent.Executors
|
|
||||||
|
|
||||||
object MyExecutor {
|
|
||||||
val myExecutor = Executors.newSingleThreadExecutor()
|
|
||||||
}
|
|
Loading…
Reference in a new issue