Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Kuan-Ying Chou <
Link:
Remove ToT dependencies in wear:compose:compose-navigation
Expand for full commit details
Remove ToT dependencies in wear:compose:compose-navigation
Bug: 374102924
Test: n/a
Change-Id: Id057c7254a0282eab77a2facb4d278e3b5ccf784
Files:
- M
wear/compose/compose-navigation/samples/build.gradle
Hash: 285f596b323a37b82e07621acb990847b8cf4328
Date: Thu Oct 31 13:36:53 2024
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Kuan-Ying Chou <
Link:
Update Kotlin targets to 1.9
Expand for full commit details
Update Kotlin targets to 1.9
Update Kotlin target of savedstate and projects that depend on it to 1.9.
Bug: 374102924
Test: existing tests still pass
Change-Id: I442310ec57f7db381c16f95985a952deb9af57b2
Files:
- M
lifecycle/lifecycle-viewmodel-compose/build.gradle
- M
lifecycle/lifecycle-viewmodel-compose/samples/build.gradle
- M
lifecycle/lifecycle-viewmodel-savedstate/build.gradle
- M
lifecycle/lifecycle-viewmodel-testing/build.gradle
- M
savedstate/savedstate-ktx/build.gradle
- M
savedstate/savedstate/build.gradle
- M
savedstate/savedstate/src/nativeMain/kotlin/androidx/savedstate/internal/SynchronizedObject.native.kt
Hash: 73305d3cf9d9bfff42b1836ac0127032b7721496
Date: Tue Oct 29 17:27:51 2024
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-main
Author: Kuan-Ying Chou <
Link:
Add functions to encode serializable objects to and decode serializable objects from SavedState
.
Expand for full commit details
Add functions to encode serializable objects to and decode serializable objects from `SavedState`.
We do this by implementing an `Encoder` and a `Decoder` that writes and reads a `SavedState` output format for Kotlin Serialization (https://github.com/Kotlin/kotlinx.serialization). The format represents a Kotlin Serialization "primitive" as their corresponding `SavedState` supported type, and represents a "composite" in a `SavedState` with its property names as keys. Nested composites are represented by nested `SavedState`s.
Here are some other design choices we made:
1. We don't record size for collections and rely on the size of the `SavedState` in decoding so that collections and non-collections are treated the same.
2. To save space, we don't encode default values by default (it can be tweaked with `@EncodeDefault` with plugin-generated serializers).
3. To support nullable parameters with default arguments (e.g. `val a: String? = "foo"`) and for `SavedState` size to be correct for collections, we encode `null`s.
4. To keep things simple we don't support specifying custom `SerializersModule`s for now.
Please note that when using Kotlin Serialization and these functions as a `Parcelable` alternative on Android there's a performance overhead because of the extra serialization needed.
Also note that on Android we don't have built-in support for Android or Java specific types supported by `Bundle` or `Parcel` yet (e.g. `Exception`, `java.io.Serializable`, or `IBinder`). We may consider adding these types in the future.
Relnote: Add encodeToSavedState() and decodeFromSavedState() functions
Test: SavedStateCodecTest.kt
Bug: 374102924
Change-Id: I6f59faffaa3777bf56132a67f41b867d7a9663e5
Files:
- M
development/build_log_simplifier/messages.ignore
- M
docs-tip-of-tree/build.gradle
- A
savedstate/savedstate-samples/build.gradle
- A
savedstate/savedstate-samples/src/main/java/androidx/savedstate/SavedStateCodecSamples.kt
- 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/androidUnitTest/kotlin/androidx/savedstate/SavedStateCodecAndroidTest.android.kt
- A
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/SavedStateDecoder.kt
- A
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/SavedStateEncoder.kt
- A
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateCodecTest.kt
- A
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateCodecTestUtils.kt
- M
settings.gradle
Hash: 57162ea74b646ef7ae43397251fd4cd32e2d80c3
Date: Thu Oct 17 19:10:05 2024
ap...@google.com <ap...@google.com> #5
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add samples to SavedStateRegistryOwner.saved
property delegate
Expand for full commit details
Add samples to `SavedStateRegistryOwner.saved` property delegate
Test: N/A
Bug: 376027806
Change-Id: I94a44325435d36cefffe5f735cd182afddd7bec5
Files:
- M
savedstate/savedstate-samples/build.gradle
- A
savedstate/savedstate-samples/src/main/java/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegatesSamples.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegates.kt
Hash: 0b99d451c316024a1660969dabe286e1fc77c03c
Date: Mon Nov 04 16:09:00 2024
ap...@google.com <ap...@google.com> #7
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix SavedState.contentDeepEquals
with nested SavedState
on non-Android platforms
Expand for full commit details
Fix `SavedState.contentDeepEquals` with nested `SavedState` on non-Android platforms
* Non-Android platforms introduce a new `SavedState` symbol that wraps a `map`. Therefore, it has no default implementation for handling content deep equality like a conventional `map`.
* Note: The original implementation for non-Android used interface delegation to implement the `Map` interface, but we have changed that to avoid exposing the `Map` API and consistently require clients to use `read`/`write` on all platforms for accessing the content. That design change caused this bug.
* Includes support for primitive arrays.
Test: SavedStateTest
Bug: 376027806
Change-Id: Ic2cf4553a420ae0ef9487c43b6f05340c26f8747
Files:
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
Hash: e3c9d523185d1b367b43c2e87a7911e5abc37acc
Date: Tue Nov 05 11:06:42 2024
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix SavedStateReadWriteProperty
saving outdated values
Expand for full commit details
Fix `SavedStateReadWriteProperty` saving outdated values
* `value` was incorrectly resolving to the initial value instead of the updated `this.value`.
* Includes a fix in the unit test to catch this problem if it ever happens again.
Test: SavedStateRegistryOwnerDelegatesTest
Bug: 376027806
Change-Id: I48469094b4064964b4800684c0702bfc99b3b2a5
Files:
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegates.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegatesTest.kt
Hash: c041cc69754ec02ec7b255112e1b843beb158e19
Date: Wed Nov 06 11:03:11 2024
il...@google.com <il...@google.com> #9
This has been fixed internally and will be available in SavedState 1.3.0-alpha05.
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
Branch: androidx-main
Author: Kuan-Ying Chou <
Link:
Fix empty SavedStates not getting restored
Expand for full commit details
Fix empty SavedStates not getting restored
Fixes an issue that when we restore an empty SavedState (e.g. from an empty List or an object without properties) we will ignore it and call the initailizer instead.
Bug: 376027806
Bug: 376026744
Test: SerializationTest.kt, SavedStateRegistryOwnerDelegatesTest.kt
Change-Id: Ibc7b93a58c3327589e1b1e30573459dde266ae72
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/SerializationTest.kt
- M
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateHandleDelegates.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegates.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegatesTest.kt
Hash: 61e4357bcd441f896695fdebe1e8d4f8108ae520
Date: Thu Nov 07 23:59:57 2024
na...@google.com <na...@google.com> #11
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-desktop:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-iosarm64:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-iossimulatorarm64:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-iosx64:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-linuxarm64:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-linuxx64:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-macosarm64:2.9.0-alpha07
androidx.lifecycle:lifecycle-viewmodel-savedstate-macosx64:2.9.0-alpha07
androidx.savedstate:savedstate:1.3.0-alpha05
androidx.savedstate:savedstate-android:1.3.0-alpha05
androidx.savedstate:savedstate-desktop:1.3.0-alpha05
androidx.savedstate:savedstate-iosarm64:1.3.0-alpha05
androidx.savedstate:savedstate-iossimulatorarm64:1.3.0-alpha05
androidx.savedstate:savedstate-iosx64:1.3.0-alpha05
androidx.savedstate:savedstate-linuxarm64:1.3.0-alpha05
androidx.savedstate:savedstate-linuxx64:1.3.0-alpha05
androidx.savedstate:savedstate-macosarm64:1.3.0-alpha05
androidx.savedstate:savedstate-macosx64:1.3.0-alpha05
ap...@google.com <ap...@google.com> #12
Project: platform/frameworks/support
Branch: androidx-main
Author: Kuan-Ying Chou <
Link:
Don't load value from SavedState or call init() when set() happens before get()
Expand for full commit details
Don't load value from SavedState or call init() when set() happens before get()
Bug: 376027806
Bug: 376026744
Test: SerializationTest, SavedStateRegistryOwnerDelegatesTest
Change-Id: I466a149716350aa5a4a8b50d787c14143b3a4060
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/SerializationTest.kt
- M
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateHandleDelegates.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegates.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/serialization/SavedStateRegistryOwnerDelegatesTest.kt
Hash: 4eefb5afedd1a6741b8c1a8606936921faf46f09
Date: Fri Nov 08 10:53:37 2024
pr...@google.com <pr...@google.com> #13
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.lifecycle:lifecycle-viewmodel-savedstate:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-desktop:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-iosarm64:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-iossimulatorarm64:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-iosx64:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-linuxarm64:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-linuxx64:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-macosarm64:2.9.0-alpha08
androidx.lifecycle:lifecycle-viewmodel-savedstate-macosx64:2.9.0-alpha08
androidx.savedstate:savedstate:1.3.0-alpha06
androidx.savedstate:savedstate-android:1.3.0-alpha06
androidx.savedstate:savedstate-desktop:1.3.0-alpha06
androidx.savedstate:savedstate-iosarm64:1.3.0-alpha06
androidx.savedstate:savedstate-iossimulatorarm64:1.3.0-alpha06
androidx.savedstate:savedstate-iosx64:1.3.0-alpha06
androidx.savedstate:savedstate-linuxarm64:1.3.0-alpha06
androidx.savedstate:savedstate-linuxx64:1.3.0-alpha06
androidx.savedstate:savedstate-macosarm64:1.3.0-alpha06
androidx.savedstate:savedstate-macosx64:1.3.0-alpha06
Description
With KotlinX Serialization support for
SavedState
, it is reasonable to expect support in theSavedStateRegistryOwner
. That could look like the following: