Status Update
Comments
il...@google.com <il...@google.com> #2
BackEventCompat
is a simple wrapper around the framework BackEvent
uptimeMillis
field that we can pass through.
Over to the framework team to comment on whether System.currentItemMillis()
is a reasonable back compat for this feature request and if it makes sense to make a change on the framework side separately as well.
ga...@google.com <ga...@google.com> #3
We have added the frameTimeMillis field to BackEvent on the framework side on Android 16. It would be great if that could be mirrored in androidx. As a back compat I would suggest to use System.nanoTime() / TimeUtils.NANOS_PER_MS
.
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Jeremy Woods <
Link:
Adding support for new APIs in BackEventCompat
Expand for full commit details
Adding support for new APIs in BackEventCompat
Adding support for the new EDGE_NONE and frameTimeMillis features in the
BackEventCompat class to ensure that it is compatible with those new
features from the framework.
RelNote: "`BackEventCompat` now provides `EDGE_NONE` as a swipe edge
option to represent none-gesture back cases and `frameTimeMillis` which
can be used to calculate gesture velocity."
RelNote: "Activity is now compiled with API 36."
Test: added tests
Bug: 301910674
Fixes: 400993493
Change-Id: I510e8f026436f72b000eae153f627b02b1f1e2a3
Files:
- M
activity/activity-compose/build.gradle
- M
activity/activity-compose/samples/build.gradle
- M
activity/activity-ktx/build.gradle
- M
activity/activity/api/current.txt
- M
activity/activity/api/restricted_current.txt
- M
activity/activity/build.gradle
- M
activity/activity/src/androidTest/java/androidx/activity/BackEventCompatTest.kt
- M
activity/activity/src/main/java/androidx/activity/BackEventCompat.kt
- M
activity/integration-tests/macrobenchmark-target/build.gradle
- M
activity/integration-tests/testapp/build.gradle
Hash: 0d4dba6a6083a6cb65aa738adfa3def907f49829
Date: Wed Mar 05 21:19:01 2025
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
Author: Jeremy Woods <
Link:
Remove ToT Activity deps
Expand for full commit details
Remove ToT Activity deps
Changing all activity ToT dependencies that are not part of the activity
library to stable dependencies. None of them are depending on new
activity features.
Test: ./gradlew bOS
Bug: 301910674
Change-Id: I196e373b5ac79b187952b2979f4c962f7f6c5088
Files:
- M
activity/activity-compose/build.gradle
- M
compose/foundation/foundation/integration-tests/foundation-demos/build.gradle
- M
compose/integration-tests/hero/jetsnack/jetsnack-implementation/build.gradle
- M
compose/integration-tests/macrobenchmark-target/build.gradle
- M
compose/material3/integration-tests/macrobenchmark-target/build.gradle
- M
compose/material3/material3/integration-tests/material3-demos/build.gradle
- M
compose/runtime/runtime/compose-runtime-benchmark/build.gradle
- M
compose/runtime/runtime/integration-tests/build.gradle
- M
constraintlayout/constraintlayout-compose/integration-tests/demos/build.gradle
- M
constraintlayout/constraintlayout-compose/integration-tests/macrobenchmark-target/build.gradle
- M
core/core-backported-fixes/integration-tests/testapp/build.gradle
- M
hilt/integration-tests/viewmodelapp/build.gradle
- M
hilt/integration-tests/workerapp/build.gradle
- M
lifecycle/lifecycle-viewmodel-compose/build.gradle
- M
privacysandbox/tools/integration-tests/testapp/build.gradle
- M
savedstate/savedstate-samples/build.gradle
- M
test/uiautomator/integration-tests/testapp/build.gradle
- M
wear/benchmark/integration-tests/macrobenchmark-target/build.gradle
- M
wear/compose/compose-material3/macrobenchmark-target/build.gradle
- M
wear/compose/integration-tests/macrobenchmark-target/build.gradle
- M
window/integration-tests/macrobenchmark-target/build.gradle
- M
xr/compose/material3/integration-tests/testapp/build.gradle
Hash: 98dd3b4174987c237e28d310641844d6196eaba2
Date: Tue Mar 18 17:46:46 2025
ap...@google.com <ap...@google.com> #6
Android API Change
This bug was referenced by a recent CL that changed the Android API surface area.
The
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 activity/activity/api/current.txt
- androidx.activity
- androidx.activity.BackEventCompat
- androidx.activity.BackEventCompat.Companion
[Gerrit:https://android-review.googlesource.com/3548541]
[API-Approvers:
[Branch:androidx-main]
[LIBRARY_API_REVIEW_TAG:activity/activity/api/current.txt]
jb...@google.com <jb...@google.com> #7
This has been added internally and will be available in the Activity 1.11.0-alpha02
release.
Description
Component used: activity-compose -
PredictiveBackHandler
Right now, when getting the progress events, you can tell the
touchX
andtouchY
and the progress, but you’d need to manually track the velocity to understand the velocity with which a gesture is performed.I’d like this velocity to be able to use
animateDecay
, oranimateTo()
onAnimatable
, to be able to smoothly finish the animation from where it left off. To do this, I’ve addedVelocityTracker
, but the BackEvent doesn’t containuptimeMillis
, leading me to useSystem.currentTimeMillis
, which could be inaccurate if an event comes in a different order.