January 29, 2025

New Features

  • BaselineProfileRule now introduces a collectWithResults(...) API which includes a list of paths to the computed profiles. I056f8
  • Added androidx.benchmark.measureRepeatedOnMainThread.throwOnDeadline instrumentation argument, which can be set to false to disable the throw on deadline behavior of measureRepeatedOnMainThread for local testing. Not otherwise recommended, as this increases the likelihood of ANRs during tests. Idbeec b/353226476

API Changes

  • Added @JvmOverloads to MicrobenchmarkConfig constructor. I13fd3
  • Refactored BenchmarkRule to be built on top of coroutines, and support better yield() behavior. This refactor removed several experimental BenchmarkState APIs, but will be followed by replacements as needed. Additionally, added runWithMeasurementDisabled to clarify behavior (all measurement is paused). In the future, runWithTimingDisabled will be deprecated. I19837 b/389149423 b/311242861
  • Move PerfettoTraceProcessor to TraceProcessor in a new androidx.benchmark:benchmark-traceprocessor artifact, and make most of its API non-experimental. Any custom TraceMetric or anything reading from traces will need to update to the new TraceProcessor import. The new TraceProcessor API works exactly like the old one, but is a standalone interface library (somewhat analogous to the androidx.sqlite layer from Room) with an Android-specific implementation built into macrobenchmark. The new artifact can be used on JVM as well, but currently you'll need to start your own copy of the TraceProcessor binary and offer a port to connect to it on. I3a767 I62563 b/381134564

Bug Fixes

  • Throw a clearer error message when MacrobenchmarkScope.startActivityAndWait fails to launch the target process (potentially due to a crash in the target process), instead of the more ambiguous 'Unable to confirm activity launch completion' message I3539b
  • Fixed several syntax errors in Kotlin samples, and syntax highlighting in several Java / build.gradle samples. Ib3808
  • Clarified ArtMetric and CaptureInfo parameter docs. I96e60

API Changes

  • Added browser connection/session support to Auth Tab. I6e47b
  • Added a new API CustomTabsSession#isEphemeralBrowsingSupported that determines whether or not the ephemeral browsing is supported Ie4dea b/384548523
  • Added color scheme params support to Auth Tab APIs. I630e1
  • Added experimental ephemeral browsing option to Custom Tabs I9549d
  • Updated experimental Auth Tab APIs I8b674
  • Add new API to check if the Custom Tabs provider supports multi-network. I4307a
  • Add new service intent filter category to support multi-network. I4354a
  • Add new API to set/get the bound network when launching a URL over a custom tab. I493e1
  • Added experimental Auth Tab APIs I9b4d4
  • New experimental APIs for PendingSession Ib40e5

Bug Fixes

  • Updated AuthTabIntent Javadocs I2490c
  • Fixed session support in Auth Tab I4e280
  • This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: -Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler). Ic7bf5 b/326456246
  • Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. I9496c b/345472586

External Contribution

  • Introduce a new IPC call ICustomTabsService#prefetchWithMultipleUrls to avoid multiple IPC calls for single URLs. Ie5025
  • Make CustomTabsSession#prefetch propagate CustomTabsSession’s session id(mID) to CustomTabsService. I4ec7b
  • Add a new experimental APICustomTabsSession#prefetch(List<Uri>, PrefetchOptions), which overloads the existing API to accept multiple URLs. I54f35
  • Add a new experimental API CustomTabsSession#prefetch(Uri, PrefetchOptions), which tries to prefetch the main page (without subresources) for future navigations. I340cf

Bug Fixes

  • Fixed IndexOutOfBound crash with link annotation. Ic96d2
  • Fixed infinite recomposition in some edge cases with links. I04a03

Known Bugs

  • A bug was identified that can cause text to wrap unexpectedly in rare scenarios on Android API level 35. It cannot be fixed in 1.7, so it will be fixed in 1.8. b/391378120

API Changes

  • SemanticsNodeInteraction.semanticsId() has been removed. Use SemanticsNodeInteraction.fetchSemanticsNode().id instead. Ie397a
  • Rewrite requestAutofill API to exist outside of autofill manager. Id1929
  • ContextualFlowRow and ContextualFlowColumn have been marked as deprecated. This experimental component was introduced in 1.7 and had not yet been stabilized, and the implementation has been deemed undesirable. In the future, a component solving the use cases this component was meant to solve may be provided.
    • FlowRow and FlowColumn have experimental overloads that were introduced in 1.7 that include an overflow parameter. The use of this parameter has been deprecated, and the overloads without this parameter can be used instead. The default "overflow" behavior for these overloads will be "Clip", as it was since its introduction.
    • Many use cases for ContextualFlowRow can be accomplished using FlowRow, but we acknowledge that is not true in full generality. ContextualFlowRow is completely implementable in user-space, and one can attempt to copy its implementation and adapt if desired. In the future, we hope to solve these use cases in a different way. Ibafec

Bug Fixes

  • Fix text layout with ellipsis sometimes translating incorrectly during animations, see b/389707025 for more info Ie55b1 b/389707025
  • Fixed a bug in BasicText with TextAutoSize and maxLines set to 1. Ic0450 b/376834366
  • Text's minimum intrinsics height now takes minLines parameter into account. It means that minimum intrinsics height reported won't be smaller than the height required to satisfy the minLines parameter I225f9 b/388299762

New Features

  • Added more flexibility in customizing the appearance of Checkboxes with a new API. This API provides Stroke parameters that allow for greater control over how the checkmark and the checkbox-outline are rendered. I65a88
  • Added TwoRowsTopAppBar API, a more customizable alternative to Medium and Large app bars for creating two-row top app bars. Developers now have control over the content of titles and subtitles in both collapsed and expanded states, with customizable heights for each state. I0be3c b/306697446 b/229134133 b/268068946

API Changes

  • Renamed an experimental BottomAppBar variation to FlexibleBottomAppBar, providing more control over content arrangement and height. Iaa448
  • Update naming for properties in Button Group default object to be CapitalCase. Update the name of animateFraction to be more precise to the behavior that it's representing. I545cd
  • Adding overloads for common buttons that allow for animated shapes on press interaction. Added cached button shapes. I5ec20
  • You can now control how a FloatingToolbar with FAB reacts to scrolling by providing a FloatingToolbarScrollBehavior. For toolbars positioned along a center edge (like top or bottom center), we recommend using a scroll behavior to hide the entire component on scroll for a cleaner look. This also prevents the FAB from becoming off-center, which could happen when using the expanded flag for collapsing. I33f67
  • Updates the experimental TopAppBar APIs to use Alignment.Horizontal instead of a custom TopAppBarTitleAlignment when setting the alignment of the title and subtitle. I70ca2
  • SliderState#onValueChange is now public to give more control to the user I104eb
  • Introduce NavigationSuiteScaffoldState to allow for animation of the navigation component. Also introduce overloads of NavigationSuiteScaffold and NavigationSuiteScaffoldLayout that have a state param. I6a8c9 b/328674235

Bug Fixes

  • Move IconButtonColors and IconToggleButtonColors classes from IconButtonDefaults.kt back to IconButton.kt. I3c233

External Contribution

  • SliderState#isDragging is now public. I8458a

API Changes

  • Introduce factory functions to create pane expansion anchors of the offset type from the start and the end, respectively. I2eb21
  • Seal PaneMotion interface and remove its default transition methods. Ifc4c7
  • Introduce APIs to get the current anchor and animate to an anchor. Icf95d
  • Introduce accessibility APIs for pane expansion Icc669
  • Change PaneScaffoldParentData.preferredWidth's type to DP. Id98ee

API Changes

  • Fixes an issue where raising a throwable during composition that does not extend from Exception may lead to a 'Pending composition has not been applied' error. I356be b/382094412

Bug Fixes

  • Fixed IndexOutOfBoundsException when passing an AnnotatedString with the LinkAnnotation to the Text composable. Ic96d2
  • Fixed a timeout issue in tests in some rare cases when LinkAnnotation is used in the AnnotatedString. I04a03

API Changes

  • ContextualFlowRow and ContextualFlowColumn have been marked as deprecated. This experimental component was introduced in 1.7 and had not yet been stabilized, and the implementation has been deemed undesirable. In the future, a component solving the use cases this component was meant to solve may be provided.
    • FlowRow and FlowColumn have experimental overloads that were introduced in 1.7 that include an overflow parameter. The use of this parameter has been deprecated, and the overloads without this parameter can be used instead. The default "overflow" behavior for these overloads will be "Clip", as it was since its introduction.
    • Many use cases for ContextualFlowRow can be accomplished using FlowRow, but we acknowledge that is not true in full generality. ContextualFlowRow is completely implementable in user-space, and one can attempt to copy its implementation and adapt if desired. In the future, we hope to solve these use cases in a different way. Ibafec
  • SemanticsNodeInteraction.semanticsId() has been removed. Use SemanticsNodeInteraction.fetchSemanticsNode().id instead. Ie397a
  • The old autofill APIs are deprecated. Use the new semantics based API instead. I943ff
  • Rewrite requestAutofill API to exist outside of autofill manager. Id1929

Bug Fixes

  • Fixed focus issue where requestFocus() with a nonsensical previouslyFocusedRect parameter (related to the focus direction) would skip past a ComposeView. Ifdc2f b/388590015
  • Fixed an occasional NPE when using GraphicsLayer.record { this@ContentDrawScope.drawContent() }. If you are recording drawContent() in this way, make sure to use the GraphicsLayer#record extension function inside DrawScope, and not the member function on GraphicsLayer. I75fc0 b/389046242
  • Fix text layout with ellipsis sometimes translating incorrectly during animations, see b/389707025 for more info Ie55b1 b/389707025

API Changes

  • Add BuildCompat.isAtLeastB for checking if an API added in Baklava is available I0f89c
  • Add an experimental API to get a list of built-in displays. Idda4d
  • Add a set of APIs related to ensuring system bar contrast I9849c

Bug Fixes

  • Fix issue where getLaunchDisplayId() returned an incorrect default value of 0 on SDK < 26. Icd679
  • This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: -Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler). Iaf3e1 b/326456246

New Features

  • Add MutableStateSerializer for serializing androidx.compose.runtime.MutableState. Idfc48 b/378895074

API Changes

  • Replace overloaded SavedStateHandle.saved() delegate functions with default parameters Icd1c1
  • AbstractSavedStateViewModelFactory is deprecated as it creates a SavedStateHandle for every ViewModel, causing unnecessary overhead. Use ViewModelProvider.Factory with CreationExtras.createSavedStateHandle instead for more efficient ViewModel creation. Ia920b b/388590327

New Features

  • Enable customization of Orbiter properties on XR NavigationBar and NavigationRail. Ic300f

API Changes

  • Create ability to override ThreePaneScaffold on XR Ib66f1
  • Implement non-animated Pane override for XR I7f620
  • Add and use new experimental annotation ExperimentalMaterial3ComponentOverrideApi Ia1eaf

Bug Fixes

  • Pin Material3 XR's dependency on XR Compose. Ia02cc

Bug Fixes

  • NavDestination labels provided through XML will be parsed via NavType.get to ensure custom NavType logic is respected. Id366d b/388100796
  • When navigating to activity with dataPattern, ActivityNavigator will now try to encode the arg value with the argument's NavType. I1a71d b/383616432

Bug Fixes

  • Fix an issue that caused an unexpected scale animation when using Navigation Compose. I480f4 b/353294030
  • From Navigation 2.8.6: NavDestination labels provided through XML will be parsed via NavType.get to ensure custom NavType logic is respected. I7ec2f b/388100796
  • From Navigation 2.8.6: When navigating to activity with dataPattern, ActivityNavigator will now try to encode the arg value with the argument's NavType. I16376 b/383616432
  • From Navigation 2.8.5: Fixed an issue that caused an unexpected scale animation when using Navigation Compose and calling navigate in the same frame that the current animation is ending. I26cb1 b/353294030

Bug Fixes

  • Fix: Crash caused by IllegalArgumentException when unbinding a service that's not registered eb4e85
  • Fix: Crash IllegalArgumentException due to difference in mMaxPages and numPages. 75d763

New Features

  • Added a Composable object called SandboxedSdkUi which can be used to display remote content within a Compose UI. This object utilizes existing SandboxedSdkView concepts for session management and event listeners. I009cf
  • Changed the SandboxedUiAdapter.openSession signature to include a new SessionConstants parameter which replaces the previous windowInputToken. This parameter is to be used to pass values which will be constant for the lifetime of the SandboxedUiAdapter.Session. Ibc0df I28435

Known Issues

  • SessionObserver events are not sent for SandboxedSdkUi when it is scrolled.
  • SandboxedSdkUi is not clipped by parent views when it is in Z-above mode.

API Changes

  • Remove deprecated SDKActivityLauncher code I49a4f
  • Separated observer factory registration logic from SandboxedUiAdapter by adding a new SessionObserverFactoryRegistry interface. I245cc

API Changes

  • Room now targets Kotlin language 2.0 and will require projects to also compile with Kotlin 2.0 and equivalent or high language version. I8efb0 b/315461431 b/384600605

Bug Fixes

  • Fix an issue in Room KMP database builder when a simple name instead of a path was used in Android and the database file resolved path would not be located in the app’s data directory. I83315 b/377830104
  • Fix an issue with the Room Gradle Plugin where configuring the schema inputs and output was causing an issue on Android projects: property 'inputDirectory' is final and cannot be changed any further. 1dbb4c b/376071291
  • Add support for KSP2 in Room Gradle Plugin fixing an issue where the schema directory was not being properly set up by the plugin. Iec3c4 b/379159770

External Contribution

  • Fix an issue with Room paging integration causing UI jumps when the initial key to refresh is too close to the end of the list. Thanks to Eva! I2abbe b/389729367

New Features

  • Add MutableStateFlowSerializer for serializing kotlinx.coroutines.flow.MutableStateFlow. I6a892 b/378895070

API Changes

  • Replace overloaded SavedStateRegistryOwner.saved() delegate functions with default parameters Icd1c1
  • Make JavaSerializableSerializer and ParcelableSerializer abstract I268f6
  • Remove generic T : CharSequence from CharSequenceSerializer Ib40bd

New Features

  • The package names of the default system modules were added to the library's manifest to allow client apps to get the Device SPL for System Modules. Ic259c

API Changes

  • Renamed SecurityStateManager to SecurityStateManagerCompat, added additional documentation for public properties and functions, and made getComponentSecurityPatchLevel and getVulnerabilityReportUrl static methods. I44a0c
  • The Update Availability functionality (listAvailableUpdates() and getAvailableSecurityPatchLevel() methods) has been removed from the API surface for now and is planned to return in a future update to the library. Idbc5e
  • Accessing Vendor SPL is now guarded by a compile-time flag that is disabled by default until a future update to the library. I45b58
  • getGlobalSecurityState() now returns the global security state from the system service for SDK 35+. I7b9da

Bug Fixes

  • Fixed a crash that occurred when trying to get the Published SPL for Kernel on older versions of Android where published Kernel LTS versions aren't available. I93dff

API Changes

  • Remove androidx.sqlite.use which is now replaced by Kotlin's AutoCloseable.use in the stdlib. I470f0 b/315461431
  • The library is now compiled with Kotlin 2.0 and will require at least 2.0 in projects to be used. I8efb0 b/315461431 b/384600605

Bug Fixes

  • Move the native library loading of BundledSQLiteDriver to be lazy and when the first connection is opened to avoid the possibility of performing IO in the main thread. I78e92 b/363985585

Bug Fixes

  • Updated VersionedParcelable to avoid class init during the initial stages of unparceling, which prevents externally-controlled inputs from executing unexpected code in static initialization blocks for non-VersionedParcelable classes already present in the application classpath. Icceed
  • This library now uses JSpecify nullness annotations, which are type-use. Kotlin developers should use the following compiler argument to enforce correct usage: -Xjspecify-annotations=strict (this is the default starting with version 2.1.0 of the Kotlin compiler). Ibc328 b/326456246
  • Removed manual outlining of access to new platform APIs since this happens automatically via API modeling when using R8 with AGP 7.3 or later (e.g. R8 version 3.3) and for all builds when using AGP 8.1 or later (e.g. D8 version 8.1). Clients who are not using AGP are advised to update to D8 version 8.1 or later. See this article for more details. Ia60e0 b/345472586

API Changes

  • On CurvedTextStyle, we have split letter spacing into clockwise letter spacing and counter clockwise letter spacing. This is required because clockwise letters fan out from the baseline whereas counter-clockwise letters fan in (so larger letter spacing is needed) I4b848
  • The CompositionLocal LocalReduceMotion has been simplified to return a Boolean instead of a ReduceMotion object. The ReduceMotion interface has now been deprecated. Previous invocations such as LocalReduceMotion.current.enabled() can be replaced with LocalReduceMotion.current I4937f
  • In PagerDefaults, snapAnimationSpec has been renamed to SnapAnimationSpec. I20c9a

API Changes

  • On CurvedTextStyle, we have split letter spacing into clockwise letter spacing and counter clockwise letter spacing. This is required because clockwise letters fan out from the baseline whereas counter-clockwise letters fan in (so larger letter spacing is needed) I4b848
  • We have updated IconButtonShapes, IconToggleButtonShapes, TextButtonShapes and TextToggleButtonShapes to improve consistency across Material3 libraries. This change also introduces shape caching to reduce the number of allocations. I049fc
  • We have removed the pressedShapeCornerSizeFraction parameter from the variantAnimatedShape method in IconToggleButton and TextToggleButton I58a65
  • We are introducing improvements to curved text rendering (including TimeText) that are incompatible with non-round screens. Non-round screen support is also no longer part of the Wear OS requirements, see the Getting Started guide for more information. I1cc1c
  • We have updated ButtonGroup’s ButtonGroupScope, replacing the DSL-based ButtonGroupItem with Modifier.weight, Modifier.minWidth and Modifier.enlargeOnPress. I16c3c
  • In the ButtonGroup API, we have updated the new modifier-based ButtonGroupScope: enlargeOnPress is now called animateWidth, and it takes an InteractionSource, rather than MutableInteractionSource because it is not necessary to mutate it. We have also added public constant ButtonGroupDefaults.DefaultMinWidth, the default minimum width of buttons in a ButtonGroup. Ie27ec
  • We have updated ListHeaderDefaults.contentColor to start with a lowercase letter as it is a composable property I125a5
  • We have added a content description parameter to SliderDefaults.DecreaseIcon and SliderDefaults.IncreaseIcon, with suitable default values I2e1a7
  • We have renamed the spacing parameter in Picker and PickerGroup to verticalSpacing Ib75cc
  • We have removed ConfirmationDialogDefaults.successText and failureText because it is expected that callers of ConfirmationDialog will provide strings with more context. Also renamed confirmationCurvedText to confirmationDialogCurvedText. Finally, renamed the Dialog show parameter to visible for consistency with other recent updates to dialogs. I10074
  • IconButton renamed disabledImageOpacity to DisabledImageOpacity. I5f94a

Bug Fixes

  • We have fixed a bug in EdgeButton animation so that the correct size is used in each frame Id3b58
  • Fixed an issue with animateContentSize not working with Button. Ib18a0
  • We have changed the Title Large type scale to have font size 18dp Ic9d52
  • We have updated AlertDialog spacing and icon size Iac28c
  • We have fixed inconsistencies in large screen breakpoints (screens at and above 225dp are large screen) I36474
  • Fixed a minor bug in button positioning I952c2

New Features

  • Added API option to set different triggers for Lottie animations. Additionally, added API for triggers fired when layout is visible I8272d
  • Added border, visibility and opacity modifiers. I6d3dd
  • Added avatar button to ProtoLayout Material3 component. Idb5ae
  • We are now allowing margins (side and in some cases bottom) to be customized in Material3 primaryLayout. Ib22f6
  • Add the segmented variant of the circular progress indicator. I6a648
  • Added compact button component to ProtoLayout Material3. Ia3c5c
  • Added pill shape button and image button components to ProtoLayout Material3. Ifb88a

API Changes

  • LayoutModfier.foldIn is now called foldRight to better reflect its expected behaviour Idf242
  • VisibleOnce trigger is now experimental. Ib2d26
  • Remove withOpacity from the public API as there is a graphics library alternative. I030c2
  • Renamed top level methods in LayoutString.kt and LayoutColor.kt to have Java friendly names. I7aff0
  • Removed non-ProtoLayout typographies in Material3. Idd9ae
  • Add suffix Color to fields in *Colors classes in Material3. I2d114

Bug Fixes

  • Add EdgeButton fallback implementation for older renderer without asymmetrical corners support. I63364
  • Add fallback implementation of the circular progress indicator with older renderer. I0f134

New Features

The 1.1.0-beta01 release of Wear Phone Interactions indicates that this release of the library is feature complete and the API is locked (except where marked as experimental). Wear Phone Interactions 1.1 includes the following new functionalities and APIs:

  • Added property redirectUrl to OAuthRequest.
  • Documentation fixes
  • Additional type in PhoneTypeHelper to specify when device is not paired with phone, instead of using existing unknown type.

API Changes

  • Added new definition for paired device type - none, when device is not paired with the phone. I06cb8