File tree Expand file tree Collapse file tree
sentry-android-sqlite/src/main/java/io/sentry/sqlite Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,6 +22,8 @@ import org.jetbrains.annotations.ApiStatus
2222 * .build()
2323 * ```
2424 *
25+ * If you're using the Sentry Android Gradle plugin, wrapping will be performed automatically.
26+ *
2527 * @param delegate The [SQLiteDriver] instance to delegate calls to.
2628 */
2729@ApiStatus.Experimental
@@ -87,9 +89,17 @@ public class SentrySQLiteDriver private constructor(private val delegate: SQLite
8789 *
8890 * In the case of (2), wrap the open helper passed to the `SupportSQLiteDriver` constructor via
8991 * `SentrySupportSQLiteOpenHelper` instead.
92+ *
93+ * Note that wrapping will be performed if the delegate isn't a `SupportSQLiteDriver` itself
94+ * but wraps or subclasses one. In that case, ensure the open helper passed to the support
95+ * driver constructor is *not* wrapped.
9096 */
97+ // The Sentry Android Gradle Plugin relies on this method's ABI. Don't change it without
98+ // updating the SAGP.
9199 @JvmStatic
92100 public fun create (delegate : SQLiteDriver ): SQLiteDriver =
101+ // The SAGP relies on the FQN check for correctness (it lets it naively instrument all
102+ // Room.DatabaseBuilder.setDriver() call sites).
93103 if (delegate is SentrySQLiteDriver || delegate.javaClass.name == SUPPORT_SQLITE_DRIVER_FQN ) {
94104 delegate
95105 } else {
You can’t perform that action at this time.
0 commit comments