Revert sqlite

This commit is contained in:
Rafał Kobyłko 2023-05-06 20:06:50 +02:00
parent 454de54655
commit 0af9359f53
3 changed files with 7 additions and 8 deletions

View File

@ -36,6 +36,7 @@ import com.twofasapp.start.StartModule
import com.twofasapp.time.TimeModule
import com.twofasapp.usecases.services.PinOptionsUseCase
import io.reactivex.plugins.RxJavaPlugins
import net.sqlcipher.database.SQLiteDatabase
import org.koin.android.ext.android.inject
import org.koin.android.ext.koin.androidContext
import org.koin.core.context.startKoin
@ -124,6 +125,11 @@ class App : MultiDexApplication() {
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(sendCrashLogsPreference.get())
FileLogger.log("App start")
try {
SQLiteDatabase.loadLibs(this)
} catch (e: Exception) {
}
}
override fun attachBaseContext(base: Context) {

View File

@ -8,7 +8,7 @@ object AppConfig {
private const val verMajor = 4
private const val verMinor = 5
private const val verPatch = 8
private const val verInternal = 0
private const val verInternal = 1
const val versionCode = verMajor * 1000000 + verMinor * 10000 + verPatch * 100 + verInternal
const val versionName = "${verMajor}.${verMinor}.${verPatch}"

View File

@ -1,7 +1,6 @@
package com.twofasapp.persistence
import androidx.room.Room
import com.getkeepsafe.relinker.ReLinker
import com.twofasapp.common.environment.AppBuild
import com.twofasapp.di.KoinModule
import com.twofasapp.persistence.cipher.DatabaseKeyGenerator
@ -37,12 +36,6 @@ class PersistenceModule : KoinModule {
MIGRATION_10_11,
)
SQLiteDatabase.loadLibs(context) { libraries: Array<String?> ->
libraries.forEach { library ->
ReLinker.loadLibrary(context, library)
}
}
if (get<AppBuild>().isDebuggable.not()) {
val factory = SupportFactory(SQLiteDatabase.getBytes(get<GetDatabaseMasterKey>().execute().toCharArray()))
builder.openHelperFactory(factory)