Skip to content

Commit e689907

Browse files
committed
Bump androidx.sqlite to 2.6.2 to pick up new hasConnectionPool method
1 parent 37591e7 commit e689907

5 files changed

Lines changed: 18 additions & 1 deletion

File tree

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ androidx-lifecycle-common-java8 = { module = "androidx.lifecycle:lifecycle-commo
9494
androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "androidxLifecycle" }
9595
androidx-navigation-runtime = { module = "androidx.navigation:navigation-runtime", version.ref = "androidxNavigation" }
9696
androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidxNavigation" }
97-
androidx-sqlite = { module = "androidx.sqlite:sqlite", version = "2.5.2" }
97+
androidx-sqlite = { module = "androidx.sqlite:sqlite", version = "2.6.2" }
9898
androidx-recyclerview = { module = "androidx.recyclerview:recyclerview", version = "1.2.1" }
9999
androidx-browser = { module = "androidx.browser:browser", version = "1.8.0" }
100100
async-profiler = { module = "tools.profiler:async-profiler", version.ref = "asyncProfiler" }

sentry-android-sqlite/api/sentry-android-sqlite.api

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ public final class io/sentry/sqlite/SentrySQLiteDriver : androidx/sqlite/SQLiteD
2525
public static final field Companion Lio/sentry/sqlite/SentrySQLiteDriver$Companion;
2626
public synthetic fun <init> (Landroidx/sqlite/SQLiteDriver;Lkotlin/jvm/internal/DefaultConstructorMarker;)V
2727
public static final fun create (Landroidx/sqlite/SQLiteDriver;)Landroidx/sqlite/SQLiteDriver;
28+
public fun getHasConnectionPool ()Z
29+
public synthetic fun hasConnectionPool ()Z
2830
public fun open (Ljava/lang/String;)Landroidx/sqlite/SQLiteConnection;
2931
}
3032

sentry-android-sqlite/src/main/java/io/sentry/sqlite/SentrySQLiteDriver.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite
3535
SentryIntegrationPackageStorage.getInstance().addIntegration("SQLiteDriver")
3636
}
3737

38+
override val hasConnectionPool: Boolean
39+
get() = delegate.hasConnectionPool
40+
3841
@Suppress("TooGenericExceptionCaught")
3942
override fun open(fileName: String): SQLiteConnection {
4043
val connection = delegate.open(fileName)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:tools="http://schemas.android.com/tools">
3+
4+
<!-- Override b/c androidx.sqlite 2.6.0 raised its minSdk to 23, but this test module is at minSdk 21. -->
5+
<uses-sdk tools:overrideLibrary="androidx.sqlite.db"/>
6+
</manifest>

sentry-android-sqlite/src/test/java/io/sentry/sqlite/SentrySQLiteDriverTest.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ class SentrySQLiteDriverTest {
9393
fun `all calls are propagated to the delegate`() {
9494
val sut = fixture.getSut("myapp.db")
9595

96+
whenever(fixture.mockDriver.hasConnectionPool).thenReturn(true)
97+
assertTrue(sut.hasConnectionPool)
98+
99+
whenever(fixture.mockDriver.hasConnectionPool).thenReturn(false)
100+
assertFalse(sut.hasConnectionPool)
101+
96102
sut.open("myapp.db")
97103
verify(fixture.mockDriver).open("myapp.db")
98104
}

0 commit comments

Comments
 (0)