Fixed
Status Update
Comments
pa...@google.com <pa...@google.com> #2
Hi. Thanks for reporting this. Fixed in alpha-04
ap...@google.com <ap...@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
ap...@google.com <ap...@google.com> #4
deleted
tc...@google.com <tc...@google.com> #5
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha04
tc...@google.com <tc...@google.com> #6
Hi Jelle. Can you please update this by eod Tues so that we can close the iteration. Thanks.
je...@google.com <je...@google.com> #7
Sorry, removed it from the dev14 hotlist
je...@google.com <je...@google.com> #8
A workaround that can be used if you encounter this problem in one of your tests, is to pause the clock at the beginning of the test and advance it manually whenever you need to move forward in the animations that are currently running:
@get:Rule
val composeTestRule = createComposeRule()
val clockTestRule get() = composeTestRule.clockTestRule
@Test
fun test() {
clockTestRule.pauseClock()
// ...
runOnIdle {
clockTestRule.advanceClock(1000)
}
// ...
}
ap...@google.com <ap...@google.com> #9
Project: platform/frameworks/support
Branch: androidx-main
commit f0649b27c6df6fa151202e3f23913998805fb398
Author: Jelle Fresen <jellefresen@google.com>
Date: Tue Jan 26 12:06:58 2021
Add isInfinite to Animation and VectorizedAnimationSpec
Will be used to facilitate special handling of infinte animations in
tests, so the test framework won't await these animations indefinitely.
Bug: 151940543
Test: IsInfiniteTest.kt
Relnote: "Added `Animation.isInfinite` and
`VectorizedAnimationSpec.isInfinite` that signal if an animation is
infinite or not. This can be used in implementations of animations to
have special handling of such animations. For example, a special \"time
remaining\" message can be shown, or during tests the animation can be
cancelled to prevent waiting for idleness indefinitely."
Change-Id: Iebb05e9d158b4fe81d037ab28e113da4926c50cd
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Animation.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt
A compose/animation/animation-core/src/test/java/androidx/compose/animation/core/IsInfiniteTest.kt
https://android-review.googlesource.com/1560508
Branch: androidx-main
commit f0649b27c6df6fa151202e3f23913998805fb398
Author: Jelle Fresen <jellefresen@google.com>
Date: Tue Jan 26 12:06:58 2021
Add isInfinite to Animation and VectorizedAnimationSpec
Will be used to facilitate special handling of infinte animations in
tests, so the test framework won't await these animations indefinitely.
Bug: 151940543
Test: IsInfiniteTest.kt
Relnote: "Added `Animation.isInfinite` and
`VectorizedAnimationSpec.isInfinite` that signal if an animation is
infinite or not. This can be used in implementations of animations to
have special handling of such animations. For example, a special \"time
remaining\" message can be shown, or during tests the animation can be
cancelled to prevent waiting for idleness indefinitely."
Change-Id: Iebb05e9d158b4fe81d037ab28e113da4926c50cd
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/Animation.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/VectorizedAnimationSpec.kt
A compose/animation/animation-core/src/test/java/androidx/compose/animation/core/IsInfiniteTest.kt
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
commit ae92240e2b212a7c0cfbccdd716efa84f3da34f2
Author: Jelle Fresen <jellefresen@google.com>
Date: Thu Jan 28 17:15:52 2021
Cancel infinite animations in tests
Infinite animations are now started through withInfiniteAnimation, which
checks the InfiniteAnimationPolicy and applies it if present when
withFrameNanos or withFrameMillis is called.
ComposeTestRule installs an InfiniteAnimationPolicy in the
applyCoroutineContext that cancels the coroutine when that policy is
applied.
This enables us to remove special handling of demos with infinite
animations in DemoTest, and we can now remove blinkingCursorEnabled.
Fixes: 151940543
Bug: 168695905
Test: ./gradlew compose:animation:animation-core:test && \
./gradlew compose:animation:animation-core:cC && \
./gradlew compose:ui:ui-test:cC
Relnote: "Introduced an `InfiniteAnimationPolicy` coroutine context
element that will be applied in infinite animations. By default no
policy is installed, except when running tests with `ComposeTestRule`."
Change-Id: I50ec421d7db495459a61c9282dbc2bfbc1f1ad02
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-core/src/androidAndroidTest/kotlin/androidx/compose/animation/core/InfiniteTransitionTest.kt
A compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/InfiniteAnimationPolicy.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/InfiniteTransition.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/SuspendAnimation.kt
A compose/animation/animation-core/src/test/java/androidx/compose/animation/core/InfiniteAnimationPolicyTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldCursor.kt
M compose/integration-tests/demos/src/androidTest/java/androidx/compose/integration/demos/test/DemoTest.kt
M compose/integration-tests/src/main/java/androidx/ui/integration/test/core/text/TextFieldToggleTextTestCase.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.kt
A compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/InfiniteAnimationTest.kt
https://android-review.googlesource.com/1563734
Branch: androidx-main
commit ae92240e2b212a7c0cfbccdd716efa84f3da34f2
Author: Jelle Fresen <jellefresen@google.com>
Date: Thu Jan 28 17:15:52 2021
Cancel infinite animations in tests
Infinite animations are now started through withInfiniteAnimation, which
checks the InfiniteAnimationPolicy and applies it if present when
withFrameNanos or withFrameMillis is called.
ComposeTestRule installs an InfiniteAnimationPolicy in the
applyCoroutineContext that cancels the coroutine when that policy is
applied.
This enables us to remove special handling of demos with infinite
animations in DemoTest, and we can now remove blinkingCursorEnabled.
Fixes: 151940543
Bug: 168695905
Test: ./gradlew compose:animation:animation-core:test && \
./gradlew compose:animation:animation-core:cC && \
./gradlew compose:ui:ui-test:cC
Relnote: "Introduced an `InfiniteAnimationPolicy` coroutine context
element that will be applied in infinite animations. By default no
policy is installed, except when running tests with `ComposeTestRule`."
Change-Id: I50ec421d7db495459a61c9282dbc2bfbc1f1ad02
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-core/src/androidAndroidTest/kotlin/androidx/compose/animation/core/InfiniteTransitionTest.kt
A compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/InfiniteAnimationPolicy.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/InfiniteTransition.kt
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/SuspendAnimation.kt
A compose/animation/animation-core/src/test/java/androidx/compose/animation/core/InfiniteAnimationPolicyTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/textfield/TextFieldCursorTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextFieldCursor.kt
M compose/integration-tests/demos/src/androidTest/java/androidx/compose/integration/demos/test/DemoTest.kt
M compose/integration-tests/src/main/java/androidx/ui/integration/test/core/text/TextFieldToggleTextTestCase.kt
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.kt
A compose/ui/ui-test/src/androidAndroidTest/kotlin/androidx/compose/ui/test/InfiniteAnimationTest.kt
Description
No description yet.