Fixed
Status Update
Comments
ma...@google.com <ma...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug: b/161809385
Bug: b/161807956
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
https://android-review.googlesource.com/1394868
Branch: androidx-master-dev
commit 23a7d960caf43390a554700d3c56ada189a9d10e
Author: Louis Pullen-Freilich <lpf@google.com>
Date: Mon Aug 10 15:11:36 2020
IconButton / IconToggleButton API scrub
Test: ./gradlew updateApi
Bug:
Bug:
Relnote: "Adds enabled parameter to IconButton, and reorders parameters in IconToggleButton"
Change-Id: I0a9419b1a631cadad451395302ad87b7f9214f96
M ui/ui-material/api/current.txt
M ui/ui-material/api/public_plus_experimental_current.txt
M ui/ui-material/api/restricted_current.txt
M ui/ui-material/src/commonMain/kotlin/androidx/compose/material/IconButton.kt
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit bac224c07d3f114ef8c38b840536a8e45f17317b
Author: Matvei Malkov <malkov@google.com>
Date: Tue Feb 09 18:33:34 2021
Remove AnimationEndReason from swipeable and its users and remove AnimationEndReason.Interrupted
Interruption is signalled with CancellationException is suspend, therefore we don't need this reason.
Without AnamationReason.Interrupted we don't really need to return it from swipeable.
Change-Id: I2cbbc6112cef6e750c10843846ee46cb9d077b03
Relnote: AnimationEndReason.Interrupted is removed. CancellationException will be throws if animation is interrupted.
Fixes: 179695417
Test: fixed
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/AnimationEndReason.kt
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomSheetScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/SwipeToDismiss.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
https://android-review.googlesource.com/1581665
Branch: androidx-main
commit bac224c07d3f114ef8c38b840536a8e45f17317b
Author: Matvei Malkov <malkov@google.com>
Date: Tue Feb 09 18:33:34 2021
Remove AnimationEndReason from swipeable and its users and remove AnimationEndReason.Interrupted
Interruption is signalled with CancellationException is suspend, therefore we don't need this reason.
Without AnamationReason.Interrupted we don't really need to return it from swipeable.
Change-Id: I2cbbc6112cef6e750c10843846ee46cb9d077b03
Relnote: AnimationEndReason.Interrupted is removed. CancellationException will be throws if animation is interrupted.
Fixes: 179695417
Test: fixed
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/AnimationEndReason.kt
M compose/material/material/api/current.txt
M compose/material/material/api/public_plus_experimental_current.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/androidAndroidTest/kotlin/androidx/compose/material/SwipeableTest.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BackdropScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/BottomSheetScaffold.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/ModalBottomSheet.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/SwipeToDismiss.kt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Swipeable.kt
Description
Per offline discussion, Matvei and I agreed that throwing
CancellationException
inswipeable
when the suspendanimateTo
is canceled would be more consistent with developer expectation, therefore less error-prone.Giving this issue a high-priority since it involves API change.
Matvei, could you please remove
Interrupted
fromAnimationEndReason
API as you implement the proposed cancellation handling? :)