Fixed
Status Update
Comments
kl...@google.com <kl...@google.com>
ap...@google.com <ap...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
na...@google.com <na...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug: b/264018028
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
https://android-review.googlesource.com/2373449
Branch: androidx-main
commit e782987543a9f8ccd485e970ddc74564b24378db
Author: Vighnesh Raut <vighnesh.raut13@gmail.com>
Date: Mon Jan 02 15:27:40 2023
fix: tab row crashes when only 1 tab is added
Bug:
Test: Added unit test
Change-Id: I6381dbac304fc1d69d3708c6655f8b595668e93f
M tv/tv-material/src/androidTest/java/androidx/tv/material/TabRowTest.kt
M tv/tv-material/src/main/java/androidx/tv/material/TabRow.kt
Description
We have tests for things like that certain types of text changes don't cause too many recompositions. Those tests pass when sending commands through the IME command code path, but fail when going through the semantics code path. The semantics code path is very different than IME: we just directly invoke the
onValueChanged
callback.This is an opportunity for other bugs as well – internal state can get out of sync because one way of mutating it updates internal state directly, and the other asks the composition to update our state on the next frame.
Semantics actions should go through the same code paths as IME commands, or as close as possible.
For example, the
TextFieldTests.textField_stringOverload_doesNotCallOnValueChange_whenCompositionUpdatesOnly
test fails if text clearance is performed via theSetText
action instead of IME commands. They should behave the same.