Fixed
Status Update
Comments
da...@google.com <da...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 25369f983e26d758a8a027c84b21f20026637181
Author: Chris Craik <ccraik@google.com>
Date: Mon Jul 12 14:05:36 2021
Update JankCollectionHelper to support S gfxinfo
Fixes: 193260119
Relnote: Fixes FrameTimingMetric to work on Android S beta
Test: ./gradlew bench:integration-tests:macrobenchmark:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=androidx.benchmark.integration.macrobenchmark.TrivialListScrollBenchmark # On R + S
Still manually cherry-picking changes, as the platform copy of the
file triggers many lint warnings in AndroidX build.
Change-Id: Ib60ccf09fb2fa09f128374140c3657015626dd2c
M benchmark/macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java
M benchmark/macro/src/main/java/androidx/benchmark/macro/Metric.kt
https://android-review.googlesource.com/1763870
Branch: androidx-main
commit 25369f983e26d758a8a027c84b21f20026637181
Author: Chris Craik <ccraik@google.com>
Date: Mon Jul 12 14:05:36 2021
Update JankCollectionHelper to support S gfxinfo
Fixes: 193260119
Relnote: Fixes FrameTimingMetric to work on Android S beta
Test: ./gradlew bench:integration-tests:macrobenchmark:connectedAndroidTest -P android.testInstrumentationRunnerArguments.class=androidx.benchmark.integration.macrobenchmark.TrivialListScrollBenchmark # On R + S
Still manually cherry-picking changes, as the platform copy of the
file triggers many lint warnings in AndroidX build.
Change-Id: Ib60ccf09fb2fa09f128374140c3657015626dd2c
M benchmark/macro/src/main/java/androidx/benchmark/macro/JankCollectionHelper.java
M benchmark/macro/src/main/java/androidx/benchmark/macro/Metric.kt
to...@gmail.com <to...@gmail.com> #3
@Query("UPDATE conversations SET unseen_message_count = (SELECT count(1) FROM messages m WHERE m.user_id != :userId AND m.status = 'DELIVERED' AND m.conversation_id = :conversationId) WHERE conversation_id = :conversationId ")
fun takeUnseen(userId: String, conversationId: String)
fun takeUnseen(userId: String, conversationId: String)
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3f37f108979d2183a8fd0290cba719fcb4733398
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jul 11 13:23:30 2019
Various fixed regarding expanding projections.
1. When expanded projections are off, we still need to re-write the
a query with parameters, we failed to due this because the flag was too
broad.
2. Since bindings args got moved to the interpreter and the interpreter
is being used only read queries, then we stopped re-writing binding args
for write queries (prepared queries).
3. Database Views being transformed.
1 & 2 is fixed by correctly scoping the expandProjection flag and
adding the query transformation to write queries. The interpreted query
was also refactored to not be a public var.
3 is fixed by simply reverting the changes to expand projections in
views. Transforming the VIEW can be dangerous since it changes the
schema identity, which can lead to situations where we change our
transform logic and the schema identity.
Bug: 137254857
Test: /gradlew room:room-compiler:test \
room:integration-tests:room-testapp:cC
Change-Id: I3b354d12f2e916592244af0678993c141f46c77e
M room/compiler/src/main/kotlin/androidx/room/parser/ParsedQuery.kt
M room/compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryInterpreter.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Database.kt
M room/compiler/src/main/kotlin/androidx/room/vo/DatabaseView.kt
M room/compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryInterpreterTest.kt
M room/compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DatabaseViewTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/SimpleEntityReadWriteTest.java
https://android-review.googlesource.com/1014649
https://goto.google.com/android-sha1/3f37f108979d2183a8fd0290cba719fcb4733398
Branch: androidx-master-dev
commit 3f37f108979d2183a8fd0290cba719fcb4733398
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jul 11 13:23:30 2019
Various fixed regarding expanding projections.
1. When expanded projections are off, we still need to re-write the
a query with parameters, we failed to due this because the flag was too
broad.
2. Since bindings args got moved to the interpreter and the interpreter
is being used only read queries, then we stopped re-writing binding args
for write queries (prepared queries).
3. Database Views being transformed.
1 & 2 is fixed by correctly scoping the expandProjection flag and
adding the query transformation to write queries. The interpreted query
was also refactored to not be a public var.
3 is fixed by simply reverting the changes to expand projections in
views. Transforming the VIEW can be dangerous since it changes the
schema identity, which can lead to situations where we change our
transform logic and the schema identity.
Bug: 137254857
Test: /gradlew room:room-compiler:test \
room:integration-tests:room-testapp:cC
Change-Id: I3b354d12f2e916592244af0678993c141f46c77e
M room/compiler/src/main/kotlin/androidx/room/parser/ParsedQuery.kt
M room/compiler/src/main/kotlin/androidx/room/processor/DatabaseProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryInterpreter.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Database.kt
M room/compiler/src/main/kotlin/androidx/room/vo/DatabaseView.kt
M room/compiler/src/main/kotlin/androidx/room/writer/QueryWriter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/BaseDaoTest.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryInterpreterTest.kt
M room/compiler/src/test/kotlin/androidx/room/solver/query/QueryWriterTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/test_util.kt
M room/compiler/src/test/kotlin/androidx/room/writer/DaoWriterTest.kt
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/dao/UserDao.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DatabaseViewTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/SimpleEntityReadWriteTest.java
da...@google.com <da...@google.com> #5
Thanks for sharing your @Query!
A fix for this issue will be available in Room 2.2.0-alpha02.
A fix for this issue will be available in Room 2.2.0-alpha02.
Description
Android 7.1
Room 2.1.0 works well, but failed on 2.2.0-alpha01
This happened on an update sql with 3 param's placeholder but 2 of them are the same, maybe this info is helpful.
```
java.lang.IllegalArgumentException: Cannot bind argument at index 3 because the index is out of range. The statement has 2 parameters.
at android.database.sqlite.SQLiteProgram.bind(SQLiteProgram.java:212)
at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:166)
at androidx.sqlite.db.framework.FrameworkSQLiteProgram.bindString(FrameworkSQLiteProgram.java:50)
at one.mixin.android.db.MessageDao_Impl.takeUnseen(XXXDao_Impl.java:1186)
at one.mixin.android.db.DaoExtensionKt$batchMarkReadAndTake$1.invoke(DaoExtension.kt:104)
at one.mixin.android.db.DaoExtensionKt$batchMarkReadAndTake$1.invoke(DaoExtension.kt)
at one.mixin.android.db.XXXDatabaseKt$sam$java_lang_Runnable$0.run(XXXDatabase.kt)
at androidx.room.RoomDatabase.runInTransaction(RoomDatabase.java:391)
```