Fixed
Status Update
Comments
pa...@google.com <pa...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
https://android-review.googlesource.com/1360099
Branch: androidx-master-dev
commit c60f33e229e31ab328ef6b59dab63b264954831c
Author: Alexandre Elias <aelias@google.com>
Date: Fri Jul 10 16:23:09 2020
Semantics no-op cleanups
Partly in response to lmr's broad code review, I did a pass of
superficial API/implementation cleanup. The main changes are:
- I changed each Boolean SemanticsProperty where false is equivalent to
not being present to take "Unit" instead. This is conceptually
clearer: it avoids questions like "can I cancel out a semantics from a
merged child by setting it to false?" Because "property = Unit" looks
weird, I also changed the style of these to "property()".
- I moved the Semantics id generator closer to where it's used, in
SemanticsModifierCore. I made it internal and an AtomicInt.
(Note that integer ids are heavily used in the Android
AccessibilityNodeInfo APIs so I can't simply remove them entirely.)
- I deleted dead code. Some examples include SemanticsHintOverrides,
a public API not connected to anything, and SemanticsPropertyKey
merge() open method which is never called. (In both cases I have
a different plan in mind for accessibility.)
Fixes: 145951226
Fixes: 145955412
Test: existing tests
Relnote: "Single-value semantics properties now use a calling style.
For example, 'semantics { hidden = true }' is now written as:
'semantics { hidden() }'."
Change-Id: Ic1afd12ea22c926babc9662f1804d80b33aa0cfc
M ui/integration-tests/benchmark/src/androidTest/java/androidx/ui/benchmark/test/LayoutNodeModifierBenchmark.kt
M ui/ui-core/api/0.1.0-dev15.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev15.txt
M ui/ui-core/api/restricted_current.txt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/graphics/vector/VectorTest.kt
M ui/ui-core/src/androidAndroidTest/kotlin/androidx/ui/semantics/SemanticsTests.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidActuals.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeView.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidComposeViewAccessibilityDelegateCompat.kt
M ui/ui-core/src/androidMain/kotlin/androidx/ui/core/AndroidPopup.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/Expect.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsConfiguration.kt
D ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsHintOverrides.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsModifier.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsNode.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsOwner.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/core/semantics/SemanticsWrapper.kt
M ui/ui-core/src/commonMain/kotlin/androidx/ui/semantics/SemanticsProperties.kt
M ui/ui-foundation/api/0.1.0-dev15.txt
M ui/ui-foundation/api/current.txt
M ui/ui-foundation/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-foundation/api/public_plus_experimental_current.txt
M ui/ui-foundation/api/restricted_0.1.0-dev15.txt
M ui/ui-foundation/api/restricted_current.txt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Clickable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Dialog.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/Scroller.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Selectable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/selection/Toggleable.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/semantics/FoundationSemanticsProperties.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ButtonTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CardTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/CheckboxScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/RadioButtonScreenshotTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ScaffoldTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SnackbarTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/ripple/RippleIndicationTest.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/textfield/TextFieldScreenshotTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/AppBar.kt
M ui/ui-material/src/main/java/androidx/ui/material/TextFieldImpl.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/AssertsTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/CallSemanticsActionTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ErrorMessagesTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/FindersTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/PrintToStringTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/ScrollToTest.kt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/Actions.kt
M ui/ui-test/src/main/java/androidx/ui/test/Filters.kt
M ui/ui-text/api/0.1.0-dev15.txt
M ui/ui-text/api/current.txt
M ui/ui-text/api/public_plus_experimental_0.1.0-dev15.txt
M ui/ui-text/api/public_plus_experimental_current.txt
M ui/ui-text/api/restricted_0.1.0-dev15.txt
M ui/ui-text/api/restricted_current.txt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/CoreTextField.kt
M ui/ui-text/src/commonMain/kotlin/androidx/ui/text/TextSemanticsProperties.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit ba279a0fd4cb3df553cc80cfec23353fba8c0411
Author: Jelle Fresen <jellefresen@google.com>
Date: Wed Jun 10 15:07:39 2020
Disable blinking cursor in tests by default
The blinking cursor is a poster child example of an infinite animation.
As long as we don't have a solution in place to properly deal with
infinite animations, we disable the blinking cursor in tests to avoid
tests from timing out just because there is a TextField that has focus
in the test.
I moved the TextField tests for the cursor to a separate test class, so
we can explicitly enable (and manually control) the blinking cursor for
thoses tests.
Bug: 151940543
Test: ./gradlew ui:ui-foundation:cC ui:ui-material:cC ui:ui-test:cC
Change-Id: I12984b8f43f6b587aa5cd9aabeaea96309e9086b
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/SoftwareKeyboardTest.kt
A ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldCursorTest.kt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldOnValueChangeTextFieldValueTest.kt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldTest.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/TextField.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/FilledTextFieldTest.kt
M ui/ui-test/api/0.1.0-dev14.txt
M ui/ui-test/api/api_lint.ignore
M ui/ui-test/api/current.txt
M ui/ui-test/api/public_plus_experimental_0.1.0-dev14.txt
M ui/ui-test/api/public_plus_experimental_current.txt
M ui/ui-test/api/restricted_0.1.0-dev14.txt
M ui/ui-test/api/restricted_current.txt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/ComposeTestRule.kt
M ui/ui-test/src/main/java/androidx/ui/test/android/AndroidComposeTestRule.kt
https://android-review.googlesource.com/1329004
https://goto.google.com/android-sha1/ba279a0fd4cb3df553cc80cfec23353fba8c0411
Branch: androidx-master-dev
commit ba279a0fd4cb3df553cc80cfec23353fba8c0411
Author: Jelle Fresen <jellefresen@google.com>
Date: Wed Jun 10 15:07:39 2020
Disable blinking cursor in tests by default
The blinking cursor is a poster child example of an infinite animation.
As long as we don't have a solution in place to properly deal with
infinite animations, we disable the blinking cursor in tests to avoid
tests from timing out just because there is a TextField that has focus
in the test.
I moved the TextField tests for the cursor to a separate test class, so
we can explicitly enable (and manually control) the blinking cursor for
thoses tests.
Bug: 151940543
Test: ./gradlew ui:ui-foundation:cC ui:ui-material:cC ui:ui-test:cC
Change-Id: I12984b8f43f6b587aa5cd9aabeaea96309e9086b
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/SoftwareKeyboardTest.kt
A ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldCursorTest.kt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldOnValueChangeTextFieldValueTest.kt
M ui/ui-foundation/src/androidTest/java/androidx/ui/foundation/TextFieldTest.kt
M ui/ui-foundation/src/main/java/androidx/ui/foundation/TextField.kt
M ui/ui-material/src/androidTest/java/androidx/ui/material/FilledTextFieldTest.kt
M ui/ui-test/api/0.1.0-dev14.txt
M ui/ui-test/api/api_lint.ignore
M ui/ui-test/api/current.txt
M ui/ui-test/api/public_plus_experimental_0.1.0-dev14.txt
M ui/ui-test/api/public_plus_experimental_current.txt
M ui/ui-test/api/restricted_0.1.0-dev14.txt
M ui/ui-test/api/restricted_current.txt
M ui/ui-test/src/androidTest/java/androidx/ui/test/TextActionsTest.kt
M ui/ui-test/src/main/java/androidx/ui/test/ComposeTestRule.kt
M ui/ui-test/src/main/java/androidx/ui/test/android/AndroidComposeTestRule.kt
ap...@google.com <ap...@google.com> #4
This bug was referenced by a recent CL that changed the Android API surface area.
The Android API Council <http://go/android-api-council > regularly reviews API changes for
consistency and sustainability, and we've just added this bug to our hotlist of pending reviews.
We'll wait until you mark this bug as 'Fixed' before starting our review, but please reach out
if you'd like us to review it sooner.
CHANGES TO ui/ui-test/api/current.txt
http://goto.google.com/android-api-diff/support/cur/pkg/androidx.ui.test
http://goto.google.com/android-api-diff/support/cur/clz/androidx.ui.test.ComposeTestRuleKt
http://goto.google.com/android-api-diff/support/cur/pkg/androidx.ui.test.android
http://goto.google.com/android-api-diff/support/cur/clz/androidx.ui.test.android.AndroidComposeTestCaseSetup
http://goto.google.com/android-api-diff/support/cur/clz/androidx.ui.test.android.AndroidComposeTestRuleKt
CHANGES TO ui/ui-test/api/public_plus_experimental_current.txt
http://goto.google.com/android-api-diff/support/cur/pkg/androidx.ui.test
http://goto.google.com/android-api-diff/support/cur/clz/androidx.ui.test.ComposeTestRuleKt
http://goto.google.com/android-api-diff/support/cur/pkg/androidx.ui.test.android
http://goto.google.com/android-api-diff/support/cur/clz/androidx.ui.test.android.AndroidComposeTestCaseSetup
http://goto.google.com/android-api-diff/support/cur/clz/androidx.ui.test.android.AndroidComposeTestRuleKt
The links above may take several days to start working. Generated fromhttp://go/support-current.txt/ba279a0fd4cb3df553cc80cfec23353fba8c0411
[Gerrit:http://android-review.googlesource.com/1329004 ]
[API-Approvers:pavlis@google.com]
[LIBRARY_API_REVIEW_TAG:ui/ui-test/api/0.1.0-dev14.txt]
The Android API Council <
consistency and sustainability, and we've just added this bug to our hotlist of pending reviews.
We'll wait until you mark this bug as 'Fixed' before starting our review, but please reach out
if you'd like us to review it sooner.
CHANGES TO ui/ui-test/api/current.txt
CHANGES TO ui/ui-test/api/public_plus_experimental_current.txt
The links above may take several days to start working. Generated from
[Gerrit:
[API-Approvers:pavlis@google.com]
[LIBRARY_API_REVIEW_TAG:ui/ui-test/api/0.1.0-dev14.txt]
tc...@google.com <tc...@google.com> #5
Hi Jelle. Is this fixed or is there still more work to do? Thanks!
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.