Fixed
Status Update
Comments
se...@google.com <se...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: George Mount <
Link:
Fix focus move within child AndroidViews
Expand for full commit details
Fix focus move within child AndroidViews
Fixes: 389994198
Fixes: 391378895
Relnote: "Fixes focus travel within child AndroidViews where it
can sometimes jump out of the child to the ComposeView"
Sometimes the native FocusFinder doesn't act properly and finds
the wrong View when searching. This CL changes the FocusFinder to
use a newer copy of FocusFinder for all focus search operations
in AndroidComposeView.
Test: new test, manual testing
Change-Id: I678c864afe086879c5c45b018dd82da4f23be440
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/AndroidManifest.xml
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusListenerTest.kt
- A
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/test/TestActivity2.kt
- A
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/MixedFocusChangeTest.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.android.kt
- M
compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/FocusFinderCompat.android.kt
Hash: b028bcc322095634123da91c7146bac9e23c13c7
Date: Tue Jan 14 13:48:11 2025
ya...@google.com <ya...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Ralston Da Silva <
Link:
Disabling isViewFocusFixEnabled and isRemoveFocusedViewFixEnabled
Expand for full commit details
Disabling isViewFocusFixEnabled and isRemoveFocusedViewFixEnabled
Disabling these flag to unblock 1.8 RC.
These were features/bug-fixes that were not regressions
from 1.7
Bug: 406327273
Bug: 369256395
Bug: 378570682
Bug: 376142752
Bug: 384056227
Bug: 388590015
Bug: 389994198
Bug: 391378895
Test: Ran presubmits and added TODOs to the affected tests
Change-Id: I5ffb7ff27c662838c8b464560d1df830751f015c
Files:
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/FocusViewInteropTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/OwnerFocusTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/focus/RequestFocusTest.kt
- M
compose/ui/ui/src/androidInstrumentedTest/kotlin/androidx/compose/ui/viewinterop/MixedFocusChangeTest.kt
- M
compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/ComposeUiFlags.kt
Hash: 1a33d21734ef7f68d4cad37c8d333831f304a339
Date: Tue Apr 01 17:46:50 2025
ya...@google.com <ya...@google.com> #4
I think we can do it like this.
@Entity
data class User(
@PrimaryKey
val id: Long,
val name: String,
@ColumnInfo(defaultValue = "Hello")
val message: String)
data class UserSummary(
val id: Long,
val name: String)
@Dao
interface Dao {
@Insert(User::class)
fun insert(val summary: UserSummary)
@Update(User::class)
fun update(val summary: UserSummary)
}
The POJO class has to have a field matching the primary key.
This way, we don't need to make the field nullable. What do you think?
@Entity
data class User(
@PrimaryKey
val id: Long,
val name: String,
@ColumnInfo(defaultValue = "Hello")
val message: String)
data class UserSummary(
val id: Long,
val name: String)
@Dao
interface Dao {
@Insert(User::class)
fun insert(val summary: UserSummary)
@Update(User::class)
fun update(val summary: UserSummary)
}
The POJO class has to have a field matching the primary key.
This way, we don't need to make the field nullable. What do you think?
yb...@google.com <yb...@google.com> #5
I think they are 2 different things.
A part of this is allowing people to set default values on columns such that it will translate into sqlite. They may simply be relying on it for @Query methods that do insert (which we do not support yet but we can, we should).
Another task is allowing people to use @Insert / @Update to insert into tables that are different from the passed in pojo.
For that, we probably need to enforce the primary key set on the `UserSummary` but for `Insert` we can let them not have it as long as there is an autogenerate primary key.
A part of this is allowing people to set default values on columns such that it will translate into sqlite. They may simply be relying on it for @Query methods that do insert (which we do not support yet but we can, we should).
Another task is allowing people to use @Insert / @Update to insert into tables that are different from the passed in pojo.
For that, we probably need to enforce the primary key set on the `UserSummary` but for `Insert` we can let them not have it as long as there is an autogenerate primary key.
ya...@google.com <ya...@google.com> #6
I filed partial @Insert/@Update separately as b/127549506 .
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 4f917f20e63afc653a6092ad87cfbb10bcc1552c
Author: Yuichi Araki <yaraki@google.com>
Date: Tue Nov 13 17:19:00 2018
Support column default value
Adds a new method @ColumnInfo#defaultValue() to allow declaring the
schema default value of a column. The method allows for SQL literal
values and expressions. Room will also interpret the default value as
a string literal (surrounding it with single quotess) when the affinity
of the column in TEXT.
Bug: 64088772
Test: FieldProcessorTest, DefaultValueTest
Change-Id: I4219eaec34deae618c1b119287fd949a18315936
M room/common/api/2.2.0-alpha01.ignore
M room/common/api/2.2.0-alpha01.txt
M room/common/api/current.txt
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/verifier/DatabaseVerifier.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
M room/integration-tests/incremental-annotation-processing/build.gradle
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/9.json
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/JournalDbPostMigrationTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationDb.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationTest.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DefaultValueTest.java
M room/migration/api/restricted_2.2.0-alpha01.txt
M room/migration/api/restricted_current.txt
M room/migration/src/main/java/androidx/room/migration/bundle/FieldBundle.java
M room/migration/src/test/java/androidx/room/migration/bundle/DatabaseBundleTest.java
M room/migration/src/test/java/androidx/room/migration/bundle/EntityBundleTest.java
M room/migration/src/test/java/androidx/room/migration/bundle/FieldBundleTest.java
M room/runtime/api/restricted_2.2.0-alpha01.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/androidTest/java/androidx/room/migration/TableInfoTest.java
M room/runtime/src/main/java/androidx/room/util/TableInfo.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
https://android-review.googlesource.com/825803
https://goto.google.com/android-sha1/4f917f20e63afc653a6092ad87cfbb10bcc1552c
Branch: androidx-master-dev
commit 4f917f20e63afc653a6092ad87cfbb10bcc1552c
Author: Yuichi Araki <yaraki@google.com>
Date: Tue Nov 13 17:19:00 2018
Support column default value
Adds a new method @ColumnInfo#defaultValue() to allow declaring the
schema default value of a column. The method allows for SQL literal
values and expressions. Room will also interpret the default value as
a string literal (surrounding it with single quotess) when the affinity
of the column in TEXT.
Bug: 64088772
Test: FieldProcessorTest, DefaultValueTest
Change-Id: I4219eaec34deae618c1b119287fd949a18315936
M room/common/api/2.2.0-alpha01.ignore
M room/common/api/2.2.0-alpha01.txt
M room/common/api/current.txt
M room/common/src/main/java/androidx/room/ColumnInfo.java
M room/compiler/src/main/kotlin/androidx/room/processor/FieldProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/processor/ProcessorErrors.kt
M room/compiler/src/main/kotlin/androidx/room/verifier/DatabaseVerifier.kt
M room/compiler/src/main/kotlin/androidx/room/vo/Field.kt
M room/compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/compiler/src/main/kotlin/androidx/room/writer/ValidationWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/compiler/src/test/kotlin/androidx/room/processor/FieldProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/verifier/DatabaseVerifierTest.kt
M room/integration-tests/incremental-annotation-processing/build.gradle
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/9.json
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/JournalDbPostMigrationTest.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationDb.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationTest.java
A room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/test/DefaultValueTest.java
M room/migration/api/restricted_2.2.0-alpha01.txt
M room/migration/api/restricted_current.txt
M room/migration/src/main/java/androidx/room/migration/bundle/FieldBundle.java
M room/migration/src/test/java/androidx/room/migration/bundle/DatabaseBundleTest.java
M room/migration/src/test/java/androidx/room/migration/bundle/EntityBundleTest.java
M room/migration/src/test/java/androidx/room/migration/bundle/FieldBundleTest.java
M room/runtime/api/restricted_2.2.0-alpha01.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/androidTest/java/androidx/room/migration/TableInfoTest.java
M room/runtime/src/main/java/androidx/room/util/TableInfo.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
da...@google.com <da...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 9ad96403444f1f199af41946e6548c5cfc834ce1
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jun 26 13:55:46 2019
Conditionally use column default value in equality check.
Based on the constructor called, which can be used to distinguish
between old generated code vs new generated code, don't take into
consideration column default value in equality check. This makes it
so that compatibility is maintained with old generated code using new
runtime that haven't had the chance to migrate their unaccounted for
default value migrations.
Bug: 64088772
Test: Manual - App with Room 2.1.0 & WM 1.0.0-alpha11, then upgarde both
Room to 2.2.0-alpha01 and WM to 1.0.0. Forcing WM to run migration
with new runtime, observed no crash.
Change-Id: I6649c05d39dee2e7a03e46ff01310042ac2a61f2
M room/runtime/src/androidTest/java/androidx/room/migration/TableInfoTest.java
M room/runtime/src/main/java/androidx/room/util/TableInfo.java
https://android-review.googlesource.com/999815
https://goto.google.com/android-sha1/9ad96403444f1f199af41946e6548c5cfc834ce1
Branch: androidx-master-dev
commit 9ad96403444f1f199af41946e6548c5cfc834ce1
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Wed Jun 26 13:55:46 2019
Conditionally use column default value in equality check.
Based on the constructor called, which can be used to distinguish
between old generated code vs new generated code, don't take into
consideration column default value in equality check. This makes it
so that compatibility is maintained with old generated code using new
runtime that haven't had the chance to migrate their unaccounted for
default value migrations.
Bug: 64088772
Test: Manual - App with Room 2.1.0 & WM 1.0.0-alpha11, then upgarde both
Room to 2.2.0-alpha01 and WM to 1.0.0. Forcing WM to run migration
with new runtime, observed no crash.
Change-Id: I6649c05d39dee2e7a03e46ff01310042ac2a61f2
M room/runtime/src/androidTest/java/androidx/room/migration/TableInfoTest.java
M room/runtime/src/main/java/androidx/room/util/TableInfo.java
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23e7e21de3f2438aa6d8676c371f2db8bd444495
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 08 13:09:30 2019
Conditionally use column default value in equality check part 2.
Instead of using constructor to determine if default value should be
ignored on equality check, simply ignore it if the table info has
a null default value. In practice, this means don't validate database
read default values (those read using PRAGMA table_info) if the
generated code (and the entity class) does not define a default value.
This eases migration to Room 2.2.0 for those apps who had accidentally
added default values with migrations using 'ALTER TABLE x ADD COLUMN y
TEXT NOT NULL DEFAULT z'. It won't cause their incremental migration
test to suddenly start failing and it won't cause a runtime validation
crash with 2.2.0 generated code for users whose database was migrated vs
those who recently had a fresh install. Similarly for library users of
Room such as WorkManager, their generated code using the old constructor
will still create table info objects whose default value are null,
causing them to not be validated because they weren't originally defined
in the entity.
There is also little to no value in prohibiting a default value in the
schema that is not define in Room's entity. However, if a default value
is defined in the entity class, then Room will validate its presence and
content.
Bug: 64088772
Bug: 136019383
Test: MigrationTest & TableInfoTest
Change-Id: I1f3f34a2139b2505a2bf73b88f917252496df930
M room/compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/10.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/11.json
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/9.json
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationDb.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationTest.java
M room/runtime/api/restricted_2.2.0-alpha02.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/androidTest/java/androidx/room/migration/TableInfoTest.java
M room/runtime/src/main/java/androidx/room/util/TableInfo.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
https://android-review.googlesource.com/1010368
https://goto.google.com/android-sha1/23e7e21de3f2438aa6d8676c371f2db8bd444495
Branch: androidx-master-dev
commit 23e7e21de3f2438aa6d8676c371f2db8bd444495
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Jul 08 13:09:30 2019
Conditionally use column default value in equality check part 2.
Instead of using constructor to determine if default value should be
ignored on equality check, simply ignore it if the table info has
a null default value. In practice, this means don't validate database
read default values (those read using PRAGMA table_info) if the
generated code (and the entity class) does not define a default value.
This eases migration to Room 2.2.0 for those apps who had accidentally
added default values with migrations using 'ALTER TABLE x ADD COLUMN y
TEXT NOT NULL DEFAULT z'. It won't cause their incremental migration
test to suddenly start failing and it won't cause a runtime validation
crash with 2.2.0 generated code for users whose database was migrated vs
those who recently had a fresh install. Similarly for library users of
Room such as WorkManager, their generated code using the old constructor
will still create table info objects whose default value are null,
causing them to not be validated because they weren't originally defined
in the entity.
There is also little to no value in prohibiting a default value in the
schema that is not define in Room's entity. However, if a default value
is defined in the entity class, then Room will validate its presence and
content.
Bug: 64088772
Bug: 136019383
Test: MigrationTest & TableInfoTest
Change-Id: I1f3f34a2139b2505a2bf73b88f917252496df930
M room/compiler/src/main/kotlin/androidx/room/writer/TableInfoValidationWriter.kt
M room/compiler/src/test/data/databasewriter/output/ComplexDatabase.java
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/10.json
A room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/11.json
M room/integration-tests/testapp/schemas/androidx.room.integration.testapp.migration.MigrationDb/9.json
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationDb.java
M room/integration-tests/testapp/src/androidTest/java/androidx/room/integration/testapp/migration/MigrationTest.java
M room/runtime/api/restricted_2.2.0-alpha02.txt
M room/runtime/api/restricted_current.txt
M room/runtime/src/androidTest/java/androidx/room/migration/TableInfoTest.java
M room/runtime/src/main/java/androidx/room/util/TableInfo.java
M room/testing/src/main/java/androidx/room/testing/MigrationTestHelper.java
Description
Version used:
Devices/Android versions reproduced on:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).