Fixed
Status Update
Comments
ic...@google.com <ic...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Suppress deprecate warning in AbstractSavedStateViewModelFactory tests
Expand for full commit details
Suppress deprecate warning in AbstractSavedStateViewModelFactory tests
Test: N/A
Bug: 388590327
Change-Id: Ibe2f04f4cb46f7d19d7fcab22ba2cecb4c82c68c
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/SavedStateFactoryTest.kt
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/ViewModelsWithStateTest.kt
Hash: c944a864317d80aeae8c5ee5812eb20eb1e3d0a8
Date: Mon Jan 13 17:39:17 2025
uc...@google.com <uc...@google.com>
di...@google.com <di...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Deprecate AbstractSavedStateViewModelFactory in favor of CreationExtras API
Expand for full commit details
Deprecate AbstractSavedStateViewModelFactory in favor of CreationExtras API
`AbstractSavedStateViewModelFactory` is deprecated as it creates a `SavedStateHandle` for every `ViewModel`, causing unnecessary overhead. Use `ViewModelProvider.Factory` with `CreationExtras.createSavedStateHandle` instead for more efficient `ViewModel` creation.
- Updated KDoc with deprecation details and alternatives.
- Added `@Deprecated` annotation.
RelNote: "`AbstractSavedStateViewModelFactory` is deprecated as it creates a `SavedStateHandle` for every `ViewModel`, causing unnecessary overhead. Use `ViewModelProvider.Factory` with `CreationExtras.createSavedStateHandle` instead for more efficient `ViewModel` creation."
Test: N/A
Bug: 388590327
Change-Id: Ia920b66ccabde85a105cf4e6f80aa980270098ee
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/api/current.txt
- M
lifecycle/lifecycle-viewmodel-savedstate/api/restricted_current.txt
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/AbstractSavedStateViewModelFactory.android.kt
Hash: a3dcd46d7c08fa2d407aa9f8f91fb181aa342cc8
Date: Mon Jan 13 14:45:34 2025
lu...@google.com <lu...@google.com>
lu...@google.com <lu...@google.com> #4
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-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-android:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-desktop:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-iosarm64:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-iossimulatorarm64:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-iosx64:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-linuxarm64:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-linuxx64:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-macosarm64:2.9.0-alpha09
androidx.lifecycle:lifecycle-viewmodel-savedstate-macosx64:2.9.0-alpha09
Description
2. Add a button.
3. type:
android:onClick-"button1"
4. See a red line, click "Create "onClick" event handler" option.
5. Choose an activity that you want the event to be handled (MainActivity.java)
Nothing happens.
I see a stack trace: