From 8396486d4c45f593445857e065b694dd0a6ccb4d Mon Sep 17 00:00:00 2001 From: Jigar-f Date: Wed, 24 Apr 2024 17:50:12 +0530 Subject: [PATCH] Upgrade android-db. --- android/app/build.gradle | 4 ++-- .../src/main/kotlin/io/lantern/model/dbadapter/DBAdapter.kt | 4 ++-- android/build.gradle | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 28015c71f6..c12fd8560e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -403,8 +403,8 @@ dependencies { // from https://github.com/getlantern/opus_android implementation files('libs/opuslib-release.aar') implementation 'com.github.getlantern:secrets-android:f6a7a69f3d' - implementation 'com.github.getlantern:messaging-android:e36af5da7e' - implementation 'com.github.getlantern:db-android:36239c103c' + implementation 'com.github.getlantern:db-android:5a082e0bdd' + implementation 'com.github.getlantern:messaging-android:ca369d5173' debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10' //Test implementation diff --git a/android/app/src/main/kotlin/io/lantern/model/dbadapter/DBAdapter.kt b/android/app/src/main/kotlin/io/lantern/model/dbadapter/DBAdapter.kt index a41259e971..8190aa089f 100644 --- a/android/app/src/main/kotlin/io/lantern/model/dbadapter/DBAdapter.kt +++ b/android/app/src/main/kotlin/io/lantern/model/dbadapter/DBAdapter.kt @@ -9,7 +9,7 @@ import net.sqlcipher.database.SQLiteDatabase import java.util.UUID open class DBAdapter(protected val db: SQLiteDatabase) : DB { - override fun exec(sql: String?, args: Values?) = db.execSQL(sql, args?.toBindArgs()) + override fun exec(sql: String, args: Values?) = db.execSQL(sql, args!!.toBindArgs()) override fun query(sql: String?, args: Values?) = RowsAdapter(db.rawQuery(sql, args?.toBindArgs())) @@ -54,7 +54,7 @@ class RowsAdapter(private val cursor: Cursor) : Rows { override fun close() = cursor.close() } -fun Values.toBindArgs(): Array = Array(len().toInt()) { +fun Values.toBindArgs(): Array = Array(len().toInt()) { val arg = get(it.toLong()) when (arg.type) { 0L -> arg.bytes() diff --git a/android/build.gradle b/android/build.gradle index fd681159c2..149b84540c 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -2,7 +2,7 @@ buildscript { ext.kotlin_version = '1.9.23' ext.signal_version = '2.8.1' ext.protoc_version = '4.26.1' - ext.desugarJdk = '2.0.3' + ext.desugarJdk = '2.0.4' repositories { google()