Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit e81f3bda1116a1734ec397f54dd40f8472203294
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Aug 08 12:22:30 2022
Converting `sqlite` related files in `sqlite` from Java to Kotlin (Part 1/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I7bc3574feaacb12bd4aa1c006579ddc52607a3a5
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/test/java/androidx/room/RoomSQLiteQueryTest.java
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteProgram.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
M sqlite/sqlite/src/test/java/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
M sqlite/sqlite/api/current.txt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQuery.kt
M room/room-compiler/build.gradle
M room/room-runtime/src/main/java/androidx/room/RoomSQLiteQuery.kt
M sqlite/sqlite-framework/build.gradle
M sqlite/sqlite/api/public_plus_experimental_current.txt
M sqlite/sqlite/build.gradle
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteStatement.kt
M room/room-runtime/api/restricted_current.ignore
M sqlite/sqlite/api/restricted_current.txt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorDatabase.kt
https://android-review.googlesource.com/2177713
Branch: androidx-main
commit e81f3bda1116a1734ec397f54dd40f8472203294
Author: elifbilgin <elifbilgin@google.com>
Date: Mon Aug 08 12:22:30 2022
Converting `sqlite` related files in `sqlite` from Java to Kotlin (Part 1/3).
Test: Existing tests
Bug: 240707042
Relnote: Converting `sqlite` related files in `sqlite` from Java to Kotlin.
Change-Id: I7bc3574feaacb12bd4aa1c006579ddc52607a3a5
M room/room-runtime/api/restricted_current.txt
M room/room-runtime/src/test/java/androidx/room/RoomSQLiteQueryTest.java
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteProgram.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteCompat.kt
M sqlite/sqlite/src/test/java/androidx/sqlite/db/SimpleSQLiteQueryTest.kt
M sqlite/sqlite/api/current.txt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SimpleSQLiteQuery.kt
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteQuery.kt
M room/room-compiler/build.gradle
M room/room-runtime/src/main/java/androidx/room/RoomSQLiteQuery.kt
M sqlite/sqlite-framework/build.gradle
M sqlite/sqlite/api/public_plus_experimental_current.txt
M sqlite/sqlite/build.gradle
M sqlite/sqlite/src/main/java/androidx/sqlite/db/SupportSQLiteStatement.kt
M room/room-runtime/api/restricted_current.ignore
M sqlite/sqlite/api/restricted_current.txt
M room/integration-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/QueryInterceptorTest.kt
M room/room-runtime/src/main/java/androidx/room/QueryInterceptorDatabase.kt
Description
Currently, androidx.sqlite has a small delete-db-and-retry logic that relies on the framework's
onCorruption
signal, but this has not been enough to detect the various cases in which the database fails to open. This bug itends to improve such detection and furthermore apply some extra workarounds to common issue during DB creation / opening. Such as missing DB folder, file permissions, corrupted files, etc. The idea is to make it such that androidx.sqlite tries as much as possible to return a good opened and ready to use database instead of attempting once and letting the user (app) try again.