Fixed
Status Update
Comments
si...@google.com <si...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
https://android-review.googlesource.com/1123258
https://goto.google.com/android-sha1/b90079595f33f58fece04026a97faa0d243acdb1
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
so...@google.com <so...@google.com> #3
si...@google.com <si...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically ( b/140759491 ).
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
https://android-review.googlesource.com/1288456
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
so...@google.com <so...@google.com> #5
Ah, I see, you're right.
BTW I've just quickly checked it and couldn't reproduce the bug.
si...@google.com <si...@google.com>
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
commit a736e803e286bc3326300d68a8af7daaaab2aa76
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:31:08 2021
Prevent TextField.onValueChange to fire if no change
- Added TextFieldValue overload to compare previous and
new value
- Replaced string version calling into TextFieldValue
version in order to
a) prevent double string comparison
b) (minor) extra function call
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 178510628
Change-Id: I961ed03d8d6b7e956e8c87e0cb3539890650c00a
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicTextField.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/TextFieldValue.kt
https://android-review.googlesource.com/1662698
Branch: androidx-main
commit a736e803e286bc3326300d68a8af7daaaab2aa76
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:31:08 2021
Prevent TextField.onValueChange to fire if no change
- Added TextFieldValue overload to compare previous and
new value
- Replaced string version calling into TextFieldValue
version in order to
a) prevent double string comparison
b) (minor) extra function call
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
Bug: 178510628
Change-Id: I961ed03d8d6b7e956e8c87e0cb3539890650c00a
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicTextField.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/input/TextFieldValue.kt
si...@google.com <si...@google.com>
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
commit 158980e5a32ea39d9d4ef50e69de059023b92456
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:37:10 2021
Add tests for BasicTextField.onValueChange
Added tests to check when
- no change occurs in text, String overload does not
call onValueChange
- no change occurs in value, TextFieldValue overload
does not call onValueChange
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
RelNote: Added experimental performanTextInputSelection API
Bug: 178510628
Change-Id: I2dcbbbc0178b62c7a290a7e170e00b26b74d7237
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta05.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/TextActions.kt
https://android-review.googlesource.com/1663121
Branch: androidx-main
commit 158980e5a32ea39d9d4ef50e69de059023b92456
Author: Siyamed Sinir <siyamed@google.com>
Date: Fri Apr 02 07:37:10 2021
Add tests for BasicTextField.onValueChange
Added tests to check when
- no change occurs in text, String overload does not
call onValueChange
- no change occurs in value, TextFieldValue overload
does not call onValueChange
Test: ./gradlew compose:foundation:foundation:test
Test: ./gradlew compose:foundation:foundation:cAT
RelNote: Added experimental performanTextInputSelection API
Bug: 178510628
Change-Id: I2dcbbbc0178b62c7a290a7e170e00b26b74d7237
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldTest.kt
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta05.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/src/commonMain/kotlin/androidx/compose/ui/test/TextActions.kt
tj...@fieldwire.com <tj...@fieldwire.com> #9
Hi, look like a part of this bug still remains. When the CoreTextField
composable is disposed, onBlur
gets called inside TextFieldDelegate
. A copy of TextFieldValue object is created there editProcessor.toTextFieldValue().copy(composition = null)
When this happens onValueChanged will always get called since it will fail the if check
if (value != it) {
onValueChange(it)
}
I am seeing this on foundation:1.5.0-alpha01. Please fix thanks!
hr...@gmail.com <hr...@gmail.com> #10
The status is shown as 'Fixed'. I wonder if it is being looked into. If so, please help us tracking it.
I am facing issue where recomposition happens and the state is reset due to onValueChange() that is causing unnecessary and wrongful recomposition.
I am facing issue where recomposition happens and the state is reset due to onValueChange() that is causing unnecessary and wrongful recomposition.
Description
Click on TextField, lose focus and click again or put app in background and reopen, these focus changes calls the
onValueChange
callback of TextField even with no actual text changes. This is unexpected behaviour andonValueChange
callback should only be called when there's any actual change in the text.