Fixed
Status Update
Comments
gr...@google.com <gr...@google.com>
so...@google.com <so...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add MutableStateFlowSerializer
for serializing MutableState
Expand for full commit details
Add `MutableStateFlowSerializer` for serializing `MutableState`
- Introduced an inline `MutableStateFlowSerializer` function to infer and retrieve the appropriate `KSerializer` for `MutableStateFlow` of a serializable type.
- Added an overload of `MutableStateFlowSerializer` that accepts an explicit `KSerializer` for the wrapped type, allowing for customizing the `KSerializer`.
- Implemented `MutableStateFlowSerializerImpl`, a private class that handles the serialization and deserialization logic for `MutableStateFlow`, delegating inner value processing to the provided `KSerializer`.
- Only `KSerializer<MutableStateFlow<T>>` is exposed; the `MutableStateFlowSerializerImpl` remains private.
RelNote: "Add `MutableStateFlowSerializer` for serializing `kotlinx.coroutines.flow.MutableStateFlow`."
Test: MutableStateFlowSerializerTest.kt
Fixes: 378895070
Change-Id: I6a8925772d2f124d2db4a83bff0062c1db0eb0fb
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/build.gradle
- A
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/serializers/MutableStateFlowSerializer.kt
- A
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/serialization/MutableStateFlowSerializerTest.kt
Hash: 3f45907910984f32745d62d9846e7083a3c75e4a
Date: Mon Jan 20 12:32:07 2025
na...@google.com <na...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.savedstate:savedstate:1.3.0-alpha07
androidx.savedstate:savedstate-android:1.3.0-alpha07
androidx.savedstate:savedstate-desktop:1.3.0-alpha07
androidx.savedstate:savedstate-iosarm64:1.3.0-alpha07
androidx.savedstate:savedstate-iossimulatorarm64:1.3.0-alpha07
androidx.savedstate:savedstate-iosx64:1.3.0-alpha07
androidx.savedstate:savedstate-linuxarm64:1.3.0-alpha07
androidx.savedstate:savedstate-linuxx64:1.3.0-alpha07
androidx.savedstate:savedstate-macosarm64:1.3.0-alpha07
androidx.savedstate:savedstate-macosx64:1.3.0-alpha07
Description
Steps to Reproduce or Code Sample to Reproduce:
The code below should produce a text component 2 lines tall. However it is only 1 line tall. Removing the modifier makes it correctly 2 lines tall.
Repro code:
This issue makes it that if any parent container applies this modifier, the text is measured incorrectly, breaking the UI.
Jetpack Compose version:
2024.12.01
BOMJetpack Compose component(s) used:
BasicText
/Text
andModifier.height(IntrinsicSize)
Android Studio Build: Build #AI-242.23339.11.2421.12700392, built on November 22, 2024
Kotlin version:
2.0.21