Skip to content

2024-02-21

Choose a tag to compare

@github-actions github-actions released this 21 Feb 18:36
· 99 commits to main since this release

Annotation: v1.8.0-alpha01

February 21, 2024

androidx.annotation:annotation-*:1.8.0-alpha01 is released. Version 1.8.0-alpha01 contains these commits.

API Changes

  • Added @ReplaceWith annotation to express replacements for deprecated APIs. (I38db3, b/322373864)

External Contributions

  • Thanks Ivan Matkov for moving the @MainThread annotation to the common source set. (6f228c)

Benchmark: v1.3.0-alpha01

February 21, 2024

androidx.benchmark:benchmark-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

API Changes

  • Renamed MicrobenchmarkConfig boolean parameters to avoid unnecessary word 'should' (Ia8f00, b/303387299)
  • Added BenchmarkRule.measureRepeatedOnMainThread so main thread benchmarks (e.g. ones touching Views or Compose UIs) can avoid triggering ANRs, especially during large suites in CI. (I5c86d)
  • Added FrameTimingGfxInfoMetric, an experimental alternate implementation of FrameTimingMetric with measurements coming directly from the platform, rather than extracted from the Perfetto trace. (I457cb, b/322232828)
  • Add the ability to dump an ART profile during individual warmUp iterations. (I17923)
  • Several changes to TraceSectionMetric API:
    • Add Mode.Min, Mode.Max
    • Add label argument to override section name as metric label
    • Added mode name to output to clarify metric meaning
    • Changed default to sum, as most usage of this metric is for repeated events Be aware of this changes in CI usage, as it may create discontinuities or break parsing. (Ic1e82, b/301892382, b/301955938)

Bug Fixes

  • Improved error message in baseline profile gradle plugin when specified managed device does not exist (Idea2b, b/313803289)
  • Fix for including library baseline profiles in AAR prior to AGP 8.3.0-alpha15 (I1d2af, b/313992099)
  • Fixed baseline and startup profile output url at the end of generation task (I802e5, b/313976958)
  • Adjusted data source timeouts to attempt to fix java.lang.IllegalStateException: Failed to stop [ProcessPid(processName=perfetto, pid=...)] (I8dc7d, b/323601788)
  • Add two instrumentation arguments for overriding shader dropping behavior to workaround crashes when benchmarking apps without ProfileInstaller 1.3:
    • androidx.benchmark.dropShaders.enable=true/false : can be used to skip all shader dropping (including that done in StartupMode.Cold launches), esp when benchmarking apps that don't yet use profileinstaller 1.3
    • androidx.benchmark.dropShaders.throwOnFailure=true/false : can be used to tolerate failures when trying to drop shaders, for example when benchmarking apps without profileinstaller 1.3 (I4f573)
  • Skip method tracing on UI thread when expected to take longer than a few seconds, and cleanup method traces when throwing. (I6e768)
  • Throw when filenames are longer than 200 chars to avoid unclear crashes when writing or post-processing files. (I4a5ab)
  • Fixes issue where unterminated frames at the beginning and end of the trace could be paired together, which would incorrectly report as a single extremely long frame. (I39353, b/322232828)
  • Use --skip verification on API 30+ when reinstalling a package on API 30-33 to clear ART profiles on user builds. This helps bypass Play Protect warnings that cause failures on some class of devices. (Ic9e36)
  • Use am force-stop to kill apps when not a system app like System UI or Launcher. (I5e028)
  • Macrobenchmark now waits for 1 second for the target application to flush an ART profile (previously it waited for 500 ms). (I85a50, b/316082056)
  • Improve FrameTimingMetric error when frames aren't produced, and always output link to trace when failing metric parsing to assist in diagnosing problem. (I956b9)
  • Fixed crash in FrameTimingMetric failing to parse frame id, especially on certain OEM devices. (Ia24bc, b/303823815, b/306235276)
  • Relaxed strictness of checks in FrameMetrics, and added more detail to error messages. (Iadede)

Browser: v1.8.0-rc01

February 21, 2024

androidx.browser:browser:1.8.0-rc01 is released with no changes since 1.8.0-beta02. Version 1.8.0-rc01 contains these commits.

Compose Animation: v1.6.2

February 21, 2024

androidx.compose.animation:animation-*:1.6.2 is released. Version 1.6.2 contains these commits.

Compose Animation: v1.7.0-alpha03

February 21, 2024

androidx.compose.animation:animation-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

New Features

  • New Modifier.animateContentSize that takes an additional parameter for custom content alignment. (I5623a, b/269803907)
  • New Experimental DeferredTargetAnimation for animating size, position, or any other target that is unknown during instantiation. (I60745)

Compose Compiler: v1.5.10

February 21, 2024

androidx.compose.compiler:compiler:1.5.10 and androidx.compose.compiler:compiler-hosted:1.5.10 are released. Version 1.5.10 contains these commits.

Bug Fixes

  • Support live literals inside init blocks. (b/320397488)
  • Use dispatcher parameter to check if the function is inside local class (b/323123439)

Compose Foundation: v1.6.2

February 21, 2024

androidx.compose.foundation:foundation-*:1.6.2 is released. Version 1.6.2 contains these commits.

Bug Fixes

  • Fix AnimateContentSize not resetting properly. (I07051)
  • Fix issue where intrinsicHeight of text would be over-cached in some circumstances. (3cd398, b/217910352)

Compose Foundation: v1.7.0-alpha03

February 21, 2024

androidx.compose.foundation:foundation-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

API Changes

  • Introduced DelegatableNode.requireLayoutCoordinates() as a way to get a Modifier.Node's current LayoutCoordinates without needing to override onPlaced and store the coordinates in a property yourself. (Ia8657)
  • Introduced DelegatableNode.currentLayoutCoordinates as a way to get a Modifier.Node's current LayoutCoordinates without needing to override onPlaced and store the coordinates in a property yourself. (Iaebaa)
  • Performance optimizations in DraggableAnchors used by AnchoredDraggable. (I89cff)
  • BasicTextField2 and related APIs under androidx.compose.foundation.text2 package are moved to androidx.compose.foundation.text. (I9f635)
  • BasicTextField2 no longer accepts a CodepointTransformation parameter. Use BasicSecureTextField or OutputTransformation. (Id34ff)
  • Added method to compare only the annotations of two AnnotatedStrings. (I32659)
  • Introducing ContextualFlowRow and Enhanced FlowRow/Column with MaxLines and Overflow. We are excited to announce enhancements to the experimental FlowRow and FlowColumn, now featuring maxLines and overflow support, alongside the debut of ContextualFlowRow and ContextualFlowColumn. This update is designed to provide performance optimal components, where ContextualFlow* is perfect for a large number of items making use of a small maxLines config and dynamic +N see more buttons, and FlowRow and FlowColumn is perfect for a small number of items, less than 100 items. Important: To maintain existing behavior in FlowRow or FlowColumn where all items are composed regardless of if they fit the cross axis max, set overflow to FlowRowOverflow.Visible or FlowColumnOverflow.Visible during initialization. Explore ContextualFlowRowSample and FlowRowSample for examples of these new features in action. (Ib9135, b/293577082)

Bug Fixes

  • Cursor animation no longer requests frames between on and off states. (Ia2253)
  • KeyboardOptions' deprecated copy constructors will now correctly copy all properties. (If12de)

Compose Material: v1.6.2

February 21, 2024

androidx.compose.material:material-*:1.6.2 is released. Version 1.6.2 contains these commits.

Compose Material: v1.7.0-alpha03

February 21, 2024

androidx.compose.material:material-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

API Changes

  • BottomDrawer has been promoted from experimental to stable. BottomDrawerState now exposes the progress as a function, allowing to query progress between specific targets. BottomDrawerState now allows customizing the animation spec, and confirmStateChange is not a trailing lambda anymore. (I9c029, b/261423850)
  • BackdropScaffold has been promoted from experimental to stable. The animation spec is now a tween spec in accordance with guidelines. The snackbarHost parameter of BackdropScaffold is no longer the last parameter to avoid confusion with trailing lambdas. BackdropScaffoldState exposes a progress(from, to) API to query progress between anchors. (I73f48, b/261423218)
  • Standard bottom sheets have been promoted from experimental to stable. Deprecated constructors have been removed. The animation spec is now a tween spec in accordance with guidelines. (I3c1a8, b/278692145, b/261409034)
  • Modal bottom sheets have been promoted from experimental to stable. Deprecated constructors have been removed. The animation spec is now a tween spec in accordance with guidelines. (Ic53f4, b/278692145, b/266780235, b/261409034)

Bug Fixes

  • Fixed an issue where BackdropScaffold could crash in specific scenarios in combination with LookaheadScope. (I51396)
  • Removed subcomposition inside BottomSheetScaffold to improve performance. Fixed an issue where BottomSheetScaffold would crash in specific scenarios in combination with LookaheadScope. (I2f90c)
  • Removed subcomposition inside ModalBottomSheetLayout, improving performance. (I7a025)

Compose Material3: v1.3.0-alpha01

February 21, 2024

androidx.compose.material3:material3-*:1.3.0-alpha01 is released. Version 1.3.0-alpha01 contains these commits.

New Features

  • Update Compose M3 ModalBottomSheet to support Predictive Back on U+ (Iccf32, b/281967264, b/304850357)
  • Updated Compose M3 SearchBar to support Predictive Back on U+ (I657f8)
  • Updated Slider to improve accessibility by adding a gap and stop indicator. (I3058e)
  • Updated ProgressIndicator to improve accessibility by adding a gap and stop indicator. (I21451)
  • Adding a default caret for rich tooltip, new rich tooltip API now allows for custom caret to be drawn given anchor LayoutCoordinates. (Ifd42c)

Behavior Changes

  • Material components have been migrated to use the new ripple APIs, and no longer query RippleTheme.

API Changes

  • The fun drawStopIndicator is now public. (I3f59f)
  • Mark the DatePicker's formatWithSkeleton function as internal (Ic65dc)
  • DropdownMenu now supports custom color, shape, elevation, and border. (I8e981, b/289554448, b/301887035, b/283654243)
  • Material3 components exposing a MutableInteractionSource in their API have been updated to now expose a nullable MutableInteractionSource that defaults to null. There are no semantic changes here: passing null means that you do not wish to hoist the MutableInteractionSource, and it will be created inside the component if needed. Changing to null allows for some components to never allocate a MutableInteractionSource, and allows for other components to only lazily create an instance when they need to, which improves performance across these components. If you are not using the MutableInteractionSource you pass to these components, it is recommended that you pass null instead. It is also recommended that you make similar changes in your own components. (I41abb, b/298048146)
  • Adds RippleConfiguration and LocalRippleConfiguration to allow for per-component / sub-tree customization of ripples using fixed values. For example, to change the color of a component you don't control, or to disable a ripple for a component. In most cases the default values should be used: these APIs are an escape hatch for customization of individual components / limited sub-trees. For wider changes and custom design systems, you should instead build your own ripple using createRippleModifierNode. (I7b5d6, b/298048146)
  • Adds new ripple API in material3 which replaces the deprecated rememberRipple. Also adds a temporary CompositionLocal, LocalUseFallbackRippleImplementation, to revert material3 components to using the deprecated rememberRipple / RippleTheme APIs. This will be removed in the next stable release, and is only intended to be a temporary migration aid for cases where you are providing a custom RippleTheme. (I34cbc, b/298048146)

Bug Fixes

  • Removed subcomposition inside ModalBottomSheet to improve performance. Fixed an issue where ModalBottomSheet could crash in specific scenarios in combination with LookaheadScope. (I2a198)
  • Removed subcomposition inside BottomSheetScaffold to improve performance. Fixed an issue where BottomSheetScaffold would crash in specific scenarios in combination with LookaheadScope. (Ie6401)
  • The badge alignment is adjusted to be closer to the center of the anchor content in respect to the top-right corner. (I18a28)
  • Fix an a11y issue with the DateRangePicker where the Month-Year text title was conveyed as actionable to the screen reader, Switch access, and Voice access users. (I2ac55)
  • Fixed mediumTopAppBarColors param order bug. (Ibe64a)

Compose Runtime: v1.6.2

February 21, 2024

androidx.compose.runtime:runtime-*:1.6.2 is released. Version 1.6.2 contains these commits.

Compose Runtime: v1.7.0-alpha03

February 21, 2024

androidx.compose.runtime:runtime-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

API Changes

  • Introduce a replace groups to improve detecting changes (0941b5)

Performance Improvements

  • Improve memory allocation when detecting changes (53e7fd)
  • Fix a memory leak in the composer (0e097d)
  • Use ScopeMap to pass invalidations when recomposing (e19a7e)
  • Optimize invalidations map to only keep derived states (f11c44)
  • Replace IdentityArraySet usages with ScatterSet (db572e)
  • Optimize removeScope in ScopeMap (bb0530)

Compose UI: v1.6.2

February 21, 2024

androidx.compose.ui:ui-*:1.6.2 is released. Version 1.6.2 contains these commits.

Compose UI: v1.7.0-alpha03

February 21, 2024

androidx.compose.ui:ui-*:1.7.0-alpha03 is released. Version 1.7.0-alpha03 contains these commits.

API Changes

  • Introducing ContextualFlowRow and Enhanced FlowRow/Column with MaxLines and Overflow. We are excited to announce enhancements to the experimental FlowRow and FlowColumn, now featuring maxLines and overflow support, alongside the debut of ContextualFlowRow and ContextualFlowColumn. This update is designed to provide performance optimal components, where ContextualFlow* is perfect for a large number of items making use of a small maxLines config and dynamic +N see more buttons, and FlowRow and FlowColumn is perfect for a small number of items, less than 100 items. Important: To maintain existing behavior in FlowRow or FlowColumn where all items are composed regardless of if they fit the cross axis max, set overflow to FlowRowOverflow.Visible or FlowColumnOverflow.Visible during initialization. Explore ContextualFlowRowSample and FlowRowSample for examples of these new features in action. (Ib9135, b/293577082)
  • Add maxTextLength semantics property that should be set on text fields that filter the maximum allowed number of characters. (I24d9f, b/170648072)
  • The Modifier.inspectable wrapper has been deprecated. This API will create more invalidations of your modifier than necessary, so its use is now discouraged. Developers are encouraged to implement the inspectableProperties() method on ModifierNodeElement if they would like to expose modifier properties to tooling. (Ib3236)
  • New constructor for PopupProperties which allows for full control over WindowManager.LayoutParams flags. (Ibb33e, b/312485503)
  • Introduced DelegatableNode.requireLayoutCoordinates() as a way to get a Modifier.Node's current LayoutCoordinates without needing to override onPlaced and store the coordinates in a property yourself. (Ia8657)
  • Introduced DelegatableNode.currentLayoutCoordinates as a way to get a Modifier.Node's current LayoutCoordinates without needing to override onPlaced and store the coordinates in a property yourself. (Iaebaa)
  • BasicTextField2 and related APIs under androidx.compose.foundation.text2 package are moved to androidx.compose.foundation.text. (I9f635)
  • Added a new ApproachLayoutModifierNode API to support creating custom approach logic in an explicit Modifier Node. Also added a new experimental DeferredTargetAnimation API for animations whose target is unknown at instantiation. (I60745)
  • New Path APIs to query the direction of a Path and to extract contours from a Path. (I63d04)
  • Added PathHitTest and Path.contains(Offset) to check if a Path contains a specific point. (I3b218)
  • The TextLayoutResult now exposes the getLineBaseline(lineIndex) method. This allows to read the baseline of an arbitrary line of the text in addition to existing convenience properties firstBaseline and lastBaseline. (Ide4e8, b/237428541)
  • Added method to compare only the annotations of two AnnotatedStrings. (I32659)

Bug Fixes

  • Fixed a backwards compatibility issue with SemanticsPropertyReceiver.performImeAction and SemanticsActions.PerformImeAction. (Id0528, b/322269946)

Graphics Path: v1.0.0-rc01

February 21, 2024

androidx.graphics:graphics-path:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits.

Bug Fixes

  • Improve performance of PathIterator on API < 34 (Id4629)

Games-Activity: v3.0.0-rc01

February 21, 2024

androidx.games:games-activity:3.0.0-rc01 and androidx.games:games-text-input:3.0.0-rc01 are released. Version 3.0.0-rc01 contains these commits.

Bug Fixes

  • Fixed the freeze where keyboard events were not properly handled by the looper.

Hilt: v1.2.0

February 21, 2024

androidx.hilt:hilt-*:1.2.0 is released. Version 1.2.0 contains these commits.

Important changes since 1.1.0

  • Add assisted injection support to hiltViewModel() and hiltNavGraphViewModels(). Now these functions take an additional callback in which you can use the passed in assisted factory to create an assisted injected ViewModel.

Lifecycle: v2.8.0-alpha02

February 21, 2024

androidx.lifecycle:lifecycle-*:2.8.0-alpha02 is released. Version 2.8.0-alpha02 contains these commits.

New Features

  • The dropUnlessResumed and dropUnlessStarted APIs have been added which allow you to drop click or other events that occur even after the LifecycleOwner has dropped below the given Lifecycle.State. For example, this can be used with Navigation Compose to avoid handling click events after a transition to another screen has already begun: onClick: () -> Unit = dropUnlessResumed { navController.navigate(NEW_SCREEN) } (Icba83, b/317230685)

Kotlin Conversions

  • ViewModel is now written in Kotlin (I16f26, b/214568825)
  • The lifecycle-viewmodel-ktx kotlin extensions have now been moved to the base lifecycle module. (Id787b, b/274800183)
  • The lifecycle-runtime-ktx kotlin extensions have now been moved to the base lifecycle module. (Ic3686, b/274800183)
  • The lifecycle-livedata-core-ktx kotlin extensions have now been moved to the base lifecycle module. (I54a3d, b/274800183)

Kotlin Multiplatform Compatibility

  • The core Lifecycle APIs in Lifecycle, LifecycleOwner, LifecycleObserver, Lifecycle.State, Lifecycle.Event, and LifecycleRegistry are now shipped in artifacts compatible with Kotlin Multiplatform. (b/317249252)

API Changes

  • Calling LifecycleStartEffect and LifecycleResumeEffect without a key is now an error, following the same convention as the DisposableEffect API that these APIs mirror. (Ib0e0c, b/323518079)
  • ViewModel now uses AutoCloseable instead of Closeable. That is a backward compatible change. (I27f8e, b/214568825)
  • Deprecated LiveDataReactiveStreams.toPublisher(lifecycleOwner, liveData) in favor of LiveData.toPublisher(lifecycleOwner). (Iabe29, b/262623005)

External Contribution

lint: v1.0.0-alpha01

February 21, 2024

androidx.lint:lint-gradle:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.

New Features

  • An initial set of lint checks for Gradle Plugin authors to help them catch mistakes in their code. They are expected to be used on Gradle projects that apply java-gradle-plugin. It will catch uses of internal Gradle and Android Gradle Plugin APIs and eager task configuration.

Mediarouter: v1.7.0-beta01

February 21, 2024

androidx.mediarouter:mediarouter:1.7.0-beta01 and androidx.mediarouter:mediarouter-testing:1.7.0-beta01 are released. Version 1.7.0-beta01 contains these commits.

Navigation: v2.8.0-alpha03

February 21, 2024

androidx.navigation:navigation-*:2.8.0-alpha03 is released. Version 2.8.0-alpha03 contains these commits.

API Changes

  • NavBackStackEntry.savedStateHandle is now marked as @MainThread as it uses code that is required to be on the main thread anyway. (Ibb988, b/299523245)

Bug Fixes

  • Fixed an issue in Navigation that caused NavGraph ViewModels to be DESTROYED too soon because the associated entry’s ViewModel was not part of the saved state. (Ib6bb7, b/317581849)

Dependency Update

Test Uiautomator: v2.3.0

February 21, 2024

androidx.test.uiautomator:uiautomator:2.3.0 is released. Version 2.3.0 contains these commits.

Important changes since 2.2.0

  • Multi-display support: Added support for finding and operating on objects across multiple displays, and UiDevice methods to manage secondary displays (Ie6544, I912cd).
  • New selectors:
    • Added By.displayId to select objects by their display ID (I1825b).
    • Added By.hasParent and By.hasAncestor to select objects according to their parents (I93c36).
    • Added By.hint methods to select objects by their hint text (Idd345).
  • Custom conditions: Exposed a Condition interface to support custom wait conditions, and added corresponding UiDevice#wait, UiObject2#wait, and UiObject2#scrollUntil methods (27c0ea, 099d6e).
  • Bug fixes and reliability
    • Fixed an issue where the display size calculations were occasionally incorrect and might ignore portions of the screen (Ifc016). Coordinates and offsets used in tests may need to be adjusted.
    • Updated MotionEvent injection to improve accuracy (678ca3) and better emulate user gestures (454450).
    • Improved the reliability of scrolls (I7b059), rotations (c6cea0), long clicks (49572b), pinches (3c619a), and more.

Wear Compose: v1.4.0-alpha03

February 21, 2024

androidx.wear.compose:compose-*:1.4.0-alpha03 is released. Version 1.4.0-alpha03 contains these commits.

API Changes

  • The Modifier.inspectable wrapper has been deprecated. This API will create more invalidations of your modifier than necessary, so its use is now discouraged. Developers are encouraged to implement the inspectableProperties() method on ModifierNodeElement if they would like to expose modifier properties to tooling. (Ib3236)

Bug Fixes

  • We have fixed a documentation bug for WearPreview* annotations. (Id526d)

Wear Compose Material3: v1.0.0-alpha18

February 21, 2024

androidx.wear.compose:compose-material3:1.0.0-alpha18 is released. Version 1.0.0-alpha18 contains these commits.

API Changes

  • We have refactored the defaults pattern for CardColors, ToggleButtonColors and SplitToggleButtonColors by creating cached instances internally and reducing the usage of CompositionLocal. (If3fec)

Webkit: v1.11.0-alpha02

February 21, 2024

androidx.webkit:webkit:1.11.0-alpha02 is released. Version 1.11.0-alpha02 contains these commits.

New Features

  • Add setAudioMuted and isAudioMuted methods for muting (and unmuting) WebViews. This method will allow you to prevent a WebView from playing audio. (Ie7a33)

API Changes

  • URLUtilCompat is made final as it should not be subclassed. (I49ec1)