2024-02-23
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
@ReplaceWithannotation to express replacements for deprecated APIs. (I38db3, b/322373864)
External Contributions
- Thanks Ivan Matkov for moving the
@MainThreadannotation 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
MicrobenchmarkConfigboolean parameters to avoid unnecessary word 'should' (Ia8f00, b/303387299) - Added
BenchmarkRule.measureRepeatedOnMainThreadso 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 ofFrameTimingMetricwith 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
warmUpiterations. (I17923) - Several changes to
TraceSectionMetricAPI:- 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)
- Add
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
ProfileInstaller1.3:androidx.benchmark.dropShaders.enable=true/false: can be used to skip all shader dropping (including that done inStartupMode.Coldlaunches), esp when benchmarking apps that don't yet use profileinstaller 1.3androidx.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 verificationon 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-stopto kill apps when not a system app like System UI or Launcher. (I5e028) - Macrobenchmark now waits for
1 secondfor the target application to flush an ART profile (previously it waited for500 ms). (I85a50, b/316082056) - Improve
FrameTimingMetricerror when frames aren't produced, and always output link to trace when failing metric parsing to assist in diagnosing problem. (I956b9) - Fixed crash in
FrameTimingMetricfailing 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.animateContentSizethat takes an additional parameter for custom content alignment. (I5623a, b/269803907) - New Experimental
DeferredTargetAnimationfor 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
AnimateContentSizenot resetting properly. (I07051) - Fix issue where
intrinsicHeightof 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 aModifier.Node's currentLayoutCoordinateswithout needing to overrideonPlacedand store the coordinates in a property yourself. (Ia8657) - Introduced
DelegatableNode.currentLayoutCoordinatesas a way to get aModifier.Node's currentLayoutCoordinateswithout needing to overrideonPlacedand store the coordinates in a property yourself. (Iaebaa) - Performance optimizations in
DraggableAnchorsused byAnchoredDraggable. (I89cff) BasicTextField2and related APIs underandroidx.compose.foundation.text2package are moved toandroidx.compose.foundation.text. (I9f635)BasicTextField2no longer accepts aCodepointTransformationparameter. UseBasicSecureTextFieldorOutputTransformation. (Id34ff)- Added method to compare only the annotations of two
AnnotatedStrings. (I32659) - Introducing
ContextualFlowRowand EnhancedFlowRow/ColumnwithMaxLinesandOverflow. We are excited to announce enhancements to the experimentalFlowRowandFlowColumn, now featuringmaxLinesand overflow support, alongside the debut ofContextualFlowRowandContextualFlowColumn. This update is designed to provide performance optimal components, whereContextualFlow*is perfect for a large number of items making use of a smallmaxLinesconfig and dynamic +N see more buttons, andFlowRowandFlowColumnis perfect for a small number of items, less than 100 items. Important: To maintain existing behavior inFlowRoworFlowColumnwhere all items are composed regardless of if they fit the cross axis max, setoverflowtoFlowRowOverflow.VisibleorFlowColumnOverflow.Visibleduring initialization. ExploreContextualFlowRowSampleandFlowRowSamplefor 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
BottomDrawerhas been promoted from experimental to stable.BottomDrawerStatenow exposes the progress as a function, allowing to query progress between specific targets.BottomDrawerStatenow allows customizing the animation spec, andconfirmStateChangeis not a trailing lambda anymore. (I9c029, b/261423850)BackdropScaffoldhas been promoted from experimental to stable. The animation spec is now atweenspec in accordance with guidelines. ThesnackbarHostparameter ofBackdropScaffoldis no longer the last parameter to avoid confusion with trailing lambdas.BackdropScaffoldStateexposes aprogress(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
tweenspec in accordance with guidelines. (Ic53f4, b/278692145, b/266780235, b/261409034)
Bug Fixes
- Fixed an issue where
BackdropScaffoldcould crash in specific scenarios in combination withLookaheadScope. (I51396) - Removed subcomposition inside
BottomSheetScaffoldto improve performance. Fixed an issue whereBottomSheetScaffoldwould crash in specific scenarios in combination withLookaheadScope. (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
ModalBottomSheetto support Predictive Back on U+ (Iccf32, b/281967264, b/304850357) - Updated Compose M3
SearchBarto support Predictive Back on U+ (I657f8) - Updated Slider to improve accessibility by adding a gap and stop indicator. (I3058e)
- Updated
ProgressIndicatorto 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
drawStopIndicatoris now public. (I3f59f) - Mark the
DatePicker'sformatWithSkeletonfunction as internal (Ic65dc) DropdownMenunow supports custom color, shape, elevation, and border. (I8e981, b/289554448, b/301887035, b/283654243)- Material3 components exposing a
MutableInteractionSourcein their API have been updated to now expose a nullableMutableInteractionSourcethat defaults tonull. There are no semantic changes here: passing null means that you do not wish to hoist theMutableInteractionSource, and it will be created inside the component if needed. Changing to null allows for some components to never allocate aMutableInteractionSource, 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 theMutableInteractionSourceyou 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
RippleConfigurationandLocalRippleConfigurationto 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 usingcreateRippleModifierNode. (I7b5d6, b/298048146) - Adds new ripple API in material3 which replaces the deprecated
rememberRipple. Also adds a temporaryCompositionLocal,LocalUseFallbackRippleImplementation, to revert material3 components to using the deprecatedrememberRipple/RippleThemeAPIs. 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 customRippleTheme. (I34cbc, b/298048146)
Bug Fixes
- Removed subcomposition inside
ModalBottomSheetto improve performance. Fixed an issue whereModalBottomSheetcould crash in specific scenarios in combination withLookaheadScope. (I2a198) - Removed subcomposition inside
BottomSheetScaffoldto improve performance. Fixed an issue whereBottomSheetScaffoldwould crash in specific scenarios in combination withLookaheadScope. (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
DateRangePickerwhere the Month-Year text title was conveyed as actionable to the screen reader, Switch access, and Voice access users. (I2ac55) - Fixed
mediumTopAppBarColorsparam 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
ScopeMapto pass invalidations when recomposing (e19a7e) - Optimize invalidations map to only keep derived states (f11c44)
- Replace
IdentityArraySetusages withScatterSet(db572e) - Optimize
removeScopeinScopeMap(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
ContextualFlowRowand EnhancedFlowRow/Columnwith MaxLines and Overflow. We are excited to announce enhancements to the experimentalFlowRowandFlowColumn, now featuring maxLines and overflow support, alongside the debut ofContextualFlowRowandContextualFlowColumn. This update is designed to provide performance optimal components, whereContextualFlow*is perfect for a large number of items making use of a smallmaxLinesconfig and dynamic +N see more buttons, andFlowRowandFlowColumnis perfect for a small number of items, less than 100 items. Important: To maintain existing behavior inFlowRoworFlowColumnwhere all items are composed regardless of if they fit the cross axis max, setoverflowtoFlowRowOverflow.VisibleorFlowColumnOverflow.Visibleduring initialization. ExploreContextualFlowRowSampleandFlowRowSamplefor examples of these new features in action. (Ib9135, b/293577082) - Add
maxTextLengthsemantics property that should be set on text fields that filter the maximum allowed number of characters. (I24d9f, b/170648072) - The
Modifier.inspectablewrapper 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 theinspectableProperties()method onModifierNodeElementif they would like to expose modifier properties to tooling. (Ib3236) - New constructor for
PopupPropertieswhich allows for full control overWindowManager.LayoutParamsflags. (Ibb33e, b/312485503) - Introduced
DelegatableNode.requireLayoutCoordinates()as a way to get aModifier.Node's currentLayoutCoordinateswithout needing to overrideonPlacedand store the coordinates in a property yourself. (Ia8657) - Introduced
DelegatableNode.currentLayoutCoordinatesas a way to get aModifier.Node's currentLayoutCoordinateswithout needing to overrideonPlacedand store the coordinates in a property yourself. (Iaebaa) BasicTextField2and related APIs underandroidx.compose.foundation.text2package are moved toandroidx.compose.foundation.text. (I9f635)- Added a new
ApproachLayoutModifierNodeAPI to support creating custom approach logic in an explicit Modifier Node. Also added a new experimentalDeferredTargetAnimationAPI for animations whose target is unknown at instantiation. (I60745) - New
PathAPIs to query the direction of a Path and to extract contours from aPath. (I63d04) - Added
PathHitTestandPath.contains(Offset)to check if aPathcontains a specific point. (I3b218) - The
TextLayoutResultnow exposes thegetLineBaseline(lineIndex)method. This allows to read the baseline of an arbitrary line of the text in addition to existing convenience propertiesfirstBaselineandlastBaseline. (Ide4e8, b/237428541) - Added method to compare only the annotations of two
AnnotatedStrings. (I32659)
Bug Fixes
- Fixed a backwards compatibility issue with
SemanticsPropertyReceiver.performImeActionandSemanticsActions.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()andhiltNavGraphViewModels(). Now these functions take an additional callback in which you can use the passed in assisted factory to create an assisted injectedViewModel.
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
dropUnlessResumedanddropUnlessStartedAPIs have been added which allow you to drop click or other events that occur even after theLifecycleOwnerhas dropped below the givenLifecycle.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
ViewModelis now written in Kotlin (I16f26, b/214568825)- The
lifecycle-viewmodel-ktxkotlin extensions have now been moved to the base lifecycle module. (Id787b, b/274800183) - The
lifecycle-runtime-ktxkotlin extensions have now been moved to the base lifecycle module. (Ic3686, b/274800183) - The
lifecycle-livedata-core-ktxkotlin 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, andLifecycleRegistryare now shipped in artifacts compatible with Kotlin Multiplatform. (b/317249252)
API Changes
- Calling
LifecycleStartEffectandLifecycleResumeEffectwithout a key is now an error, following the same convention as theDisposableEffectAPI that these APIs mirror. (Ib0e0c, b/323518079) ViewModelnow usesAutoCloseableinstead ofCloseable. That is a backward compatible change. (I27f8e, b/214568825)- Deprecated
LiveDataReactiveStreams.toPublisher(lifecycleOwner, liveData)in favor ofLiveData.toPublisher(lifecycleOwner). (Iabe29, b/262623005)
External Contribution
- Thanks Ivan Matkov from Jetbrains for helping move Lifecycle to Kotlin Multiplatform. (aosp/2926690, I0c5ac, If445d)
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.savedStateHandleis now marked as@MainThreadas 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
NavGraphViewModels to beDESTROYEDtoo soon because the associated entry’sViewModelwas not part of the saved state. (Ib6bb7, b/317581849)
Dependency Update
- Navigation Compose now depends on Compose 1.7.0-alpha03.
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
UiDevicemethods to manage secondary displays (Ie6544, I912cd). - New selectors:
- Custom conditions: Exposed a
Conditioninterface to support custom wait conditions, and added correspondingUiDevice#wait,UiObject2#wait, andUiObject2#scrollUntilmethods (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
MotionEventinjection 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.inspectablewrapper 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 theinspectableProperties()method onModifierNodeElementif 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,ToggleButtonColorsandSplitToggleButtonColorsby creating cached instances internally and reducing the usage ofCompositionLocal. (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
setAudioMutedandisAudioMutedmethods for muting (and unmuting)WebViews. This method will allow you to prevent aWebViewfrom playing audio. (Ie7a33)
API Changes
URLUtilCompatis made final as it should not be subclassed. (I49ec1)