October 16, 2024

Bug Fixes

  • PredictiveBackHandler will no longer fire it's callback after the handler has been disabled. This will fix an issue where the NavHost from Navigation Compose would throw an IndexOutOfBoundsException. I3f75e b/340202286

Important changes since 1.8.0

  • Added support for the following Kotlin Multiplatform targets: watchosDeviceArm64, mingwX64, linuxArm64.

API Changes

  • Added node representing the PropertyDefined query function. I1aeaf
  • Add nodes to represent numeric search and property restrict. I963a9
  • Add node representing GetSearchStringParameter query function. I4f99b
  • Add node representing the HasProperty query function. I9c1c5
  • Added interface for implementing functions in AST. I9d42e
  • Add AND and OR operators. Iaa442
  • Add NegationNode for representing logical negation of queries in AST. Ia855a
  • Add Node interface to AppSearch for defining nodes. If42fb
  • Adds an Experimental API annotation for AppSearch. I3e57c

Bug Fixes

  • Add TextNodes for holding terms. Iefd02

Security Fix

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on androidx.appsearch:appsearch-external-protobuf to the latest 1.1.0-alpha06 to address the vulnerability risk.

API Changes

  • Macrobenchmark: Adds ArtMetric, which can be used to inspect profile coverage or general Android RunTime performance. Captures number and total duration of JIT, class init (where available), and class verification. Additionally, changes CaptureInfo to include optional ART mainline version with default. I930f7
  • Add coefficientOfVariation to Benchmark JSON output to show stability within a given benchmark run. Ib14ea

Bug Fixes

  • Fixed CollectBaselineProfileTask when AVD device has spaces in it. Ia0225 b/371642809
  • Speculative fix for errors from StartupMode.COLD exceptions: Package <packagename> must not be running prior to cold start!. Now, MacrobenchmarkScope.killProcess() (including the one run before each iteration, used to implement StartupMode.COLD behavior) will wait to verify that the app's processes have all stopped running. I60aa6 b/351582215
  • Fixed issue where UNLOCKED_ error would show up on some rooted emulators. Ic5117
  • 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). I7104f b/326456246

Bug Fixes

  • Fixed the issue where invoking startFocusMetering with PreviewView.getMeteringPointFactory doesn't get the correct sensor coordinates when an effect is enabled or when 4 use cases are bound (stream-sharing). I916c5 b/345993685

Bug Fixes

  • Fixed a bug causing a rare crash in text fields. I475c6 b/313010266
  • Removed ReusableContentHost at the root of Lazy layout items. This was a potential root cause for “measure called on a deactivated node” crashes. Id6e60

API Changes

  • Adds DelegatableNode#onDensityChange and DelegatableNode#onLayoutDirectionChange callbacks to allow updating node state when these change. I04f3e b/340662451
  • Paragraph and ParagraphIntrinsics now takes a list of all annotations applied to the AnnotatedString, previously it only had a list of SpanStyles. I12f80
  • Introduced PointerInputModifierNode#touchBoundsExpansion, which can be used to enlarge the touch bounds of a single pointer input modifier. Iccf02 b/335339283

Bug Fixes

  • Fixed a bug where positional thresholds passed to AnchoredDraggableDefaults.flingBehavior were not considered correctly in some scenarios. Ifdf0d b/367660226
  • Introduce a fix for nested scrollables that are removed from the node tree during an ongoing fling. Now these nodes will cancel the fling and correctly send the onPostFling event with the remaining velocity. We're also introducing the flag NewNestedScrollFlingDispatchingEnabled to control the behavior in case of regressions. The flag will be removed before beta. I05c37 b/371168883
  • Fixed a bug where OverscrollEffects passed to Modifier.anchoredDraggable would receive 2D deltas instead of 1D. Ie52c0

API Changes

  • Remove readOnly from TextFields' to pin to stable foundation version. I3aaba

Bug Fixes

  • Adds support for ripples in expanding components on Android S+, such as a card that expands on click. Previously the ripple would not fill up the new size but now it will expand to the new bounds. If509a b/183019123

API Changes

  • Updates to the date pickers to ensure consistent Locale usage throughout the DatePicker and DateRangePicker when setting a Locale directly through a DatePickerState or a DateRangePickerState. Note that when setting Locales directly to the state, it's up to you to ensure that the title and headline texts are localized accordingly, as their default text will still be applied according to the default platform Locale. I37073 b/326490763 b/321657276
  • SheetState.isAnimationRunning is now exposed. I9a3d7
  • DatePickerColors now correctly take precedence over any conflicting colors defined at the theme's Typography text styles. Also note that this update adjusts the color parameter's position in the date picker functions and introduces a contentColor parameter for customizing the header and title text colors. I30d03 b/347031394
  • Rename SplitButton to SplitButtonLayout and remove SplitButton color variants APIs, variants will be achieve by re-using button variants provided by SplitButtonDefaults. I44c36
  • ModalBottomSheet now has sheetGestureEnabled parameter I856cb b/288211587
  • Renamed the standardMotionScheme and the expressiveMotionScheme to standard and expressive. Both functions are now accessible through the MotionScheme companion object by calling MotionScheme.standard() and MotionScheme.expressive(). Iceccf
  • Adding maxWidth parameter to plain and rich tooltips. It defaults to the design spec of 200 dp for plain tooltips and 320 dp for rich tooltips. I30ce9

Bug Fixes

  • The DatePicker and DateRangePicker now correctly update the displayed month when set via their state's displayedMonthMillis. If9e47 b/333414302
  • ModalBottomSheet content now moves content away from status bar. I5114c b/321877275 b/336962418 b/342093067
  • [Bottom Sheet] Change back callback priority to PRIORITY_DEFAULT to allow IME keyboard to dismiss first. I447fb
  • Fix crashes in the DatePicker and DateRangePicker when the minimum selectable year is set to a future year. I78656 b/319395747
  • Fix a date-picker issue to update the UI when an updated SelectableDates instance is applied. Iad59a b/290135807 b/339898760

Performance Improvements

  • Provide snapshot id for state records in constructor 85c00f
  • Refactor SnapshotState*** to avoid class verification errors 6ee4a6
  • Fix R8 rules to prevent throw inlining 5beb92
  • Micro-optimize Operations d73c5c
  • Optimize SynchronizedObject allocations on JVM 2b043f

API Changes

  • Adds DelegatableNode#onDensityChange and DelegatableNode#onLayoutDirectionChange callbacks to allow updating node state when these change I04f3e b/340662451
  • Adds WindowInfo#containerSize to provide the current window's content container size. This can be retrieved using LocalWindowInfo. Idc38c b/369334429 b/360343819
  • Introduce a fix for nested scrollables that are removed from the node tree during an ongoing fling. Now these nodes will cancel the fling and correctly send the onPostFling event with the remaining velocity. We're also introducing the flag NewNestedScrollFlingDispatchingEnabled to control the behavior in case of regressions. The flag will be removed before beta. I05c37 b/371168883
  • Introduced PointerInputModifierNode#touchBoundsExpansion, which can be used to enlarge the touch bounds of a single pointer input modifier. Iccf02 b/335339283
  • Adds WindowInfo#containerSize to provide the current window's content container size. This can be retrieved using LocalWindowInfo. I27767 b/369334429 b/360343819
  • Remove readOnly from TextFields' to pin to stable foundation version. I3aaba
  • Paragraph and ParagraphIntrinsics now takes a list of all annotations applied to the AnnotatedString, previously it only had a list of SpanStyles I12f80

Bug Fixes

  • Updated how paragraphs are treated in AnnotatedString. Before you could only create non-overlapping paragraphs. Now the AnnotatedString allows fully-overlapping paragraphs which will be merged together, and nested paragraphs in which case the outer paragraph will be split on bounds of the inner one, and the inner paragraph's style will be merged with the outer paragraph's style Ic9554
  • Fix crash in AnnotatedString with a zero-length LinkAnnotation. 89aac6

Security fix

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on androidx.core:core-location-altitude-protoand androidx.core:core-location-altitude-external-protobuf to 1.1.0-alpha03 to address the vulnerability risk.

Bug Fixes

  • 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. Ieb9ae b/345472586

New Features

  • New Credential Manager provider registry support: allow providers to pre-register credential metadata with Credential Manager which can be later surfaced to the user by the Credential Manager upon an incoming app request.
  • Added ISO/IEC mdoc credential APIs for registering mdoc credentials
  • Also added a preview protocol based registry to demonstrate the end-to-end capability

New Features

  • GameTextInput now supports Left/Right keys.

API Changes

  • Obsolete Java interfaces of GameTextInput have been removed.
  • Prefabs for both GameActivity and GameTextInput now include all source files. #include <GameActivity.cpp> is not recommended anymore. Please link to a proper static or dynamic library instead, like game-activity::game-activity_static in CMake. These libraries are shipped in the AAR file.

Bug Fixes

  • Numerous fixes in GameTextInput have been made. Typing and removing functionality has been fixed.
  • Compatibility with most popular software keyboards have been improved.
  • Fixed handling of special characters on hardware keyboards.
  • Fixed a rare null pointer access in GameActivity.

Security Fixes

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on version 1.1.0 of androidx.glance:glance-appwidget-proto and androidx.glance:glance-appwidget-external-protobuf to 1.1.1 to address the vulnerability risk.

Bug Fixes

  • Fixed issue where SurfaceControl instances would still be managed by the system compositor even after they were released.
  • Fixed issue where the currently presented HardwareBuffer instance would not be released after low latency dependencies were disposed
  • Fixed flickering issue on certain Android 14+ devices that did not support the front buffer usage flag

New Features

  • Added SkinTemperature aggregation types. Ibe123
  • Added FEATURE_PLANNED_EXERCISE constant Ie02a3
  • Added History Reads permissions. I5cf41
  • Added Training plans API If5be1
  • Added SkinTemperatureRecord API. I5605d

Security Fixes

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on androidx.health:connect:connect-client-proto and androidx.health:connect:connect-client-external-protobuf to the latest 1.1.0-alpha10 to address the vulnerability risk.

New Features

  • Added new lint checks for the navigation-common, navigation-runtime, and navigation-compose modules to help identify any type-safe routes that are not correctly annotated with @Serializable. This check is applied to all NavGraphBuilder and NavDeepLinkBuilder extension functions. I4a259 I95402 Ie601a Id8c6e I28bda b/362725816
  • Added new lint checks for the navigation-common, navigation-runtime, and navigation-compose modules to help identify any type-safe routes with Enum arguments that are not correctly annotated with @Keep. This check is applied to all NavGraphBuilder and NavDeepLinkBuilder extension functions. I4a259 I95402 Ie601a Id8c6e I2b46f b/358687142

Bug Fixes

  • Fixed an issue where the new lint rules that were added in Navigation 2.8.* would cause an Obsolete custom lint check error when attempting to run lint with Android Gradle Plugin 8.4+. I1be3d b/368070326 b/371463741

Known Issues

  • Navigation lint will throw an Obsolete custom lint check error when attempting to run lint with Lint 16 (AGP 8.7) or higher. b/371926651

New Features

  • Custom Navigators can now mark their destinations as implementing the SupportingPane interface which indicates to the NavController that these destinations will be shown alongside other destinations. By using this interface, multiple destinations can be RESUMED at the same time, for instance. Id5559
  • From Navigation 2.8.3: Added new lint checks for the navigation-common, navigation-runtime, and navigation-compose modules to help identify any type-safe routes that are not correctly annotated with @Serializable. This check is applied to all NavGraphBuilder and NavDeepLinkBuilder extension functions. I4a259 I95402 Ie601a Id8c6e I28bda b/362725816
  • From Navigation 2.8.3: Added new lint checks for the navigation-common, navigation-runtime, and navigation-compose modules to help identify any type-safe routes with Enum arguments that are not correctly annotated with @Keep. This check is applied to all NavGraphBuilder and NavDeepLinkBuilder extension functions. I4a259 I95402 Ie601a Id8c6e I2b46f b/358687142

Behavior Changes

  • Attempting to use a NavController that has been previously DESTROYED will now cause an IllegalStateException. I520da b/369616172

Bug Fixes

  • Update Enum class not found exception to suggest using @Keep annotation in case the Enum class gets erased in minified builds. I90e79 b/358137294

Known Issues

  • There is an issue with the new lint rules that were added in Navigation 2.8.* that cause an Obsolete custom lint check error when attempting to run lint with Android Gradle Plugin 8.4+. b/368070326 b/371463741

API Changes

  • Create internal ByteArrayWrapper class to support Relations with ByteBuffer in non-Android & non-JVM platforms. I75543 b/367205685
  • Add SQLiteStatement.getColumnType() along with the various SQLITE_DATA_* result constants to enable retrieving the data type of a column. I1985c b/369636251

API Changes

  • Add SQLiteStatement.getColumnType() along with the various SQLITE_DATA_* result constants to enable retrieving the data type of a column. I1985c b/369636251

API Changes

  • We have renamed the Wear Compose Foundation LazyColumn to TransformingLazyColumn so that the distinction is clearer between this and the Compose Foundation LazyColumn. I0608b
  • Added rotary support for Horizontal/Vertical pagers, enabling users to navigate pagers using rotary input devices. I9770d
  • We have updated the new PagerDefaults to make clear that the pager will snap-to-page by default. Iff7d0
  • TransformingLazyColumnItemScrollProgress is now a value class which should improve the performance. Ic399e
  • TransformingLazyColumn now supports rotary out of the box. I05206
  • TransformingLazyColumnState now supports scrollToItem. I507b3
  • Removed @ExperimentalWearFoundationApi from SwipeToReveal API I34a66

API Changes

  • We have updated the ScreenScaffold and ScrollIndicator following the renaming of Wear Compose Foundation LazyColumn to TransformingLazyColumn. I0608b
  • EdgeButton's preferredHeight parameter has been renamed to buttonSize and its value can only be chosen from 4 constants in the newly introduced EdgeButtonSize value class. Icdd70
  • We have changed the naming of ListSubheader to ListSubHeader and added publicly accessible default values for ListHeader and ListSubHeader. I96730
  • We have added new HorizontalPagerScaffold and VerticalPagerScaffold components for Wear which provide new animations and coordination between time text and page indicator components. Iff7d0
  • We have added rotary support to HorizontalPagerScaffold and VerticalPagerScaffold, enabling users to navigate pagers using rotary input devices. I9770d
  • We have made MotionScheme API changes to simplify the usage and improve consistency. Removed inlined remember functions and moved the built-in Motion Schemes to a dedicated MotionScheme companion object. Renamed the standardMotionScheme and the expressiveMotionScheme to standard and expressive. I5fd45
  • We have added support for a dynamic color scheme based on system colors. I073e9
  • We have updated the Stepper to the latest UX specs. I622bb

Bug Fixes

  • We have updated typography and paddings for Card components. I3ae48
  • We have changed the padding in AlertDialog between Confirm/Dismiss buttons and the rest of the content from 8dp to 12dp according to UX specs Ie55f0
  • We have updated the color opacity for the Slider component. Idb383

Security Fixes

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on version 1.2.0 of androidx.wear.protolayout:protolayout-proto and androidx.wear.protolayout:protolayout-external-protobuf to 1.2.1 to address the vulnerability risk.

New Features

  • Initial version of Material 3 library. Includes text, edgeButton, buttonGroup and primaryLayout components.

Security Fixes

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on version 1.3.0-alpha01 of androidx.wear.protolayout:protolayout-proto and androidx.wear.protolayout:protolayout-external-protobuf to 1.3.0-alpha02 to address the vulnerability risk.

External Contribution

Security Fixes

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on version 1.4.0 of androidx.wear.tiles:tiles-proto to 1.4.1 to address the vulnerability risk.

Security Fixes

  • As of this change, androidx compiles against protobuf 4.28.2 in order to address CVE-2024-7254. Upgrade your dependency on version 1.5.0-alpha01 of androidx.wear.tiles:tiles-proto to 1.5.0-alpha02 to address the vulnerability risk.

New Features

  • Add convenience functions to get the widthDp and heightDp from WindowMetrics.

API Changes

  • Add widthDp and heightDp to WindowMetrics. Ide026
  • Remove experimental WindowInsets API. I68a71
  • Update bounds check method names to isAtLeast Ib0ab7