Fixed
Status Update
Comments
an...@google.com <an...@google.com>
ap...@google.com <ap...@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
Description
I have attached the source for the whole view and data handling and the logcat output from running the app and causing the crash on my LG G6 with Android 8.0.0. The crash has been replicated on an S20 with Android 10.
```
var searchState = state { TextFieldValue() }
var searchItems = state { results.filter(searchState.value.text) }
Box(paddingTop = 0.dp, paddingBottom = 10.dp) {
fun onImeActionPerformed(action: ImeAction, keyboard: SoftwareKeyboardController?): Unit {
Log.v("conditions", "ime pressed $action $keyboard")
}
OutlinedTextField(
value = searchState.value,
onValueChange = {
Log.v("conditions", "search bar $it")
searchState.value = it
searchItems.value = results.filter(searchState.value.text)
},
activeColor = primaryColor,
inactiveColor = primaryColor,
label = { TextDisabled { Text("Search") } },
onFocusChange = {
Log.v("conditions", "focus changed $it")
},
imeAction = ImeAction.NoAction,
keyboardType = KeyboardType.Ascii,
onImeActionPerformed = ::onImeActionPerformed,
modifier = Modifier.fillMaxWidth()
)
}
LazyColumnItems(
items = searchItems.value
) {
```