Status Update
Comments
mg...@google.com <mg...@google.com>
ca...@gmail.com <ca...@gmail.com> #2
ap...@google.com <ap...@google.com> #3
Stacktrace:
Caused by: java.lang.IllegalArgumentException: Can not get supported output size under supported maximum for the format: 34
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes(SupportedSurfaceCombination.java:355)
at androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions(SupportedSurfaceCombination.java:197)
at androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions(Camera2DeviceSurfaceManager.java:198)
at androidx.camera.core.CameraX.calculateSuggestedResolutions(CameraX.java:943)
at androidx.camera.core.CameraX.bindToLifecycle(CameraX.java:293)
at androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle(ProcessCameraProvider.java:227)
Below are some findings based on our debugging
When Dex is connected
previewConfig.getMaxResolution() is returning "731x411" as maxSize.
Inside Preview.Builder.build() -> Default_MAX_resolution is set to "CameraX.getSurfaceManager().getPreviewSize()" which is 731x411
this is being picked as maxSize.
While rendering maxSize is 731x411 and minSize is 640x480 and below are available outputSizes
0 = {Size@11860} "4032x3024"
1 = {Size@11861} "3984x2988"
2 = {Size@11862} "4032x2268"
3 = {Size@11863} "3024x3024"
4 = {Size@11864} "2976x2976"
5 = {Size@11865} "3840x2160"
6 = {Size@11866} "3264x2448"
7 = {Size@11867} "4032x1960"
8 = {Size@11868} "2880x2160"
9 = {Size@11869} "3264x1836"
10 = {Size@11870} "2160x2160"
11 = {Size@11871} "2560x1440"
12 = {Size@11872} "2224x1080"
13 = {Size@11873} "2048x1152"
14 = {Size@11874} "1920x1080"
15 = {Size@11875} "1440x1080"
16 = {Size@11876} "1088x1088"
17 = {Size@11877} "1280x720"
18 = {Size@11878} "1024x768"
19 = {Size@11879} "1056x704"
20 = {Size@11880} "960x720"
21 = {Size@11881} "960x540"
22 = {Size@11882} "720x720"
23 = {Size@11883} "800x450"
24 = {Size@11884} "720x480"
25 = {Size@11885} "640x480"
26 = {Size@11886} "352x288"
27 = {Size@11887} "320x240"
28 = {Size@11888} "256x144"
29 = {Size@11889} "176x144"
and couldn't find any size in this range.
When Dex not connected
minsize = 640x480
maxsize = 1920x1080
0 = {Size@11836} "4032x3024"
1 = {Size@11837} "3984x2988"
2 = {Size@11838} "4032x2268"
3 = {Size@11839} "3024x3024"
4 = {Size@11840} "2976x2976"
5 = {Size@11841} "3840x2160"
6 = {Size@11842} "3264x2448"
7 = {Size@11843} "4032x1960"
8 = {Size@11844} "2880x2160"
9 = {Size@11845} "3264x1836"
10 = {Size@11846} "2160x2160"
11 = {Size@11847} "2560x1440"
12 = {Size@11848} "2224x1080"
13 = {Size@11849} "2048x1152"
14 = {Size@11850} "1920x1080"
15 = {Size@11851} "1440x1080"
16 = {Size@11852} "1088x1088"
17 = {Size@11853} "1280x720"
18 = {Size@11854} "1024x768"
19 = {Size@11855} "1056x704"
20 = {Size@11856} "960x720"
21 = {Size@11857} "960x540"
22 = {Size@11858} "720x720"
23 = {Size@11859} "800x450"
24 = {Size@11860} "720x480"
25 = {Size@11861} "640x480"
26 = {Size@11862} "352x288"
27 = {Size@11863} "320x240"
28 = {Size@11864} "256x144"
29 = {Size@11865} "176x144"
and we have 12 available sizes in this range
Camera2DeviceSurfaceManager.java:: getPreviewSize()
mCameraSupportedSurfaceCombinationMap.get(cameraId).getSurfaceDefinition().getPreviewSize() = "1920x1080"
cameraId=0
ap...@google.com <ap...@google.com> #4
The issue root cause is that CameraX will default filter out sizes smaller than 640x480. For Preview, the max size will be limited to under display size. I checked the HW spec info for the issue related devices. Display size of FUJITSU F-04J/F-05J is 360x640. That will result int that no size exists in the conditions that is larger or equal to 640x480 and smaller or equal to 360x640.
A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
For device FUJITSU arrowsM04, I checked its HW spec info and its display size I found is 1280x720. It seems that the problem should not exist in the device.
Could you confirm that the problem exist on arrowsM04 device? What will be the returned value when using Display#getRealSize to obtain the display size?
ap...@google.com <ap...@google.com> #5
> A temporary workaround for this situation is to use Preview.Builder#setTargetResolution() to set a size smaller than 640x480 to bypass the problem.
OK. I will try it.
> Could you confirm that the problem exist on arrowsM04 device?
We receive the crash report (Crashlytics) that this crash has occurred on arrowsM04.
We don't have this device so we can't confirm that the problem really exist on arrowsM04.
> What will be the returned value when using Display#getRealSize to obtain the display size?
We can't investigate it for the same reason.
Thank you.
ap...@google.com <ap...@google.com> #6
This issue happened on devices that the display size is smaller than 640x480. In original auto-resolution mechanism, supported sizes smaller than 640x480 will be default filter out.
The auto-resolution mechanism encodes the guaranteed configurations tables in CameraDevice#createCaptureSession(SessionConfiguration). It defines that the PREVIEW size is the small one of the device display size and 1080p. The PREVIEW size will be the maximal size limitation for Preview use case. The reason it limits the size to display size and 1080p is the stream output in display size or 1080p has been able to provide good enough preview quality. Therefore, auto-resolution mechanism will limit the selected size to be smaller than the small one of the device display size and 1080p.
With above two conditions, in this issue, all sizes smaller than 640x480 have been filter out, therefore, there is no size smaller than the display size 320x240 can be selected to use. And cause the exception.
Solution:
When the display size is smaller than 640x480, auto-resolution mechanism won't filter out those small sizes smaller than 640x480. This makes those small size be left and can be selected for the Preview use case on small display devices.
The solution has been merged and will be included in next CameraX release.
ap...@google.com <ap...@google.com> #7
Hello.
This crash still occurs.
- CAMERAX VERSION: 1.0.0-beta4
- ANDROID OS BUILD NUMBER: Android 7.1.1
- DEVICE NAME: FUJITSU F-02H
We receive following crash report from FUJITSU F-02H. So far We have received this crash report only from F-02H.
java.lang.IllegalArgumentException
Can not get supported output size under supported maximum for the format: 34
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSupportedOutputSizes (SupportedSurfaceCombination.java:349)
androidx.camera.camera2.internal.SupportedSurfaceCombination.getSuggestedResolutions (SupportedSurfaceCombination.java:197)
androidx.camera.camera2.internal.Camera2DeviceSurfaceManager.getSuggestedResolutions (Camera2DeviceSurfaceManager.java:198)
androidx.camera.core.CameraX.calculateSuggestedResolutions (CameraX.java:949)
androidx.camera.core.CameraX.bindToLifecycle (CameraX.java:351)
androidx.camera.lifecycle.ProcessCameraProvider.bindToLifecycle (ProcessCameraProvider.java:230)
(our application's package name).CameraFragment.bindCameraUseCases (CameraFragment.java:174)
ap...@google.com <ap...@google.com> #8
Could you help to provide the following information to clarify the issue?
1. Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
2. Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
ap...@google.com <ap...@google.com> #9
- Is the full name of the device Fujitsu Arrows NX F-02H that has a 1440x2560 display?
Yes
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
Since we don't have this device, we'll try to collect this information in the next version of our app. The next version will be released later this month.
ap...@google.com <ap...@google.com> #10
Hello.
- Please help to provide the supported output sizes of ImageFormat.PRIVATE that is obtained by StreamConfigurationMap#getOutputSizes(int).
We have collected the output of the device where the crash occurs.
Device1
- Model : arrows Be F-05J
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Device2
- Model : Fujitsu arrows M04
- Android Version : 7.1.1
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0: 480x480
CameraId 1: 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
Additional Information
CameraX version : 1.0.0-beta04
We collect the supported output sizes by following code.
val errorString = buildString {
append("The supported output sizes of ImageFormat.PRIVATE: ")
(requireContext().getSystemService(Context.CAMERA_SERVICE) as CameraManager).apply {
cameraIdList.forEachIndexed { index, cameraId ->
val msg = if (VERSION.SDK_INT >= VERSION_CODES.M) {
val configurationMap =
getCameraCharacteristics(cameraId).get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP)
val sizes = configurationMap?.getOutputSizes(ImageFormat.PRIVATE)
"CameraId $index: ${sizes?.joinToString(" ,")}"
} else {
"CameraId $index: This device version is under M."
}
append(msg)
}
}
}
ap...@google.com <ap...@google.com> #11
ap...@google.com <ap...@google.com> #12
I tried to find the device specs and both 720x1280
size display. For the camera id 0 device, it is a different case that the display size is larger than 640x480
but the device only supports a 480x480
size. The case also caused the same IllegalArgumentException and was also fixed by 1.0.0-beta04
release. Before 480x480
size would be filtered out and then caused the IllegalArgumentException. After it was merged, the 640x480
size threshold was removed and then the 480x480
size would be kept and selected to use.
It looks like 1.0.0-beta04
release had been used to collect the supported sizes information. But the issue should have been fixed by 1.0.0-beta04
release. Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
CameraX's 1.0.0-beta04
version. Maybe you can also consider to upgrade to the latest 1.0.0-rc01
version for your application. Thanks.
ap...@google.com <ap...@google.com> #13
Did you only check the device model name to collect the supported sizes information or collect the information when the IllegalArgumentException issue happens again?
We collect informations only from the device on which IllegalArgumentException happened.
Our latest app uses CameraX version 1.0.0-beta10
and this issue still occurres.
However we don't receive crash report from Fujitsu arrows Be F-05J
or Fujitsu arrows M04
so far. (This doesn't mean this issue is fixed on these devices because our app is heavily rely on camera so these device's user wouldn't use our app anymore.)
Instead, we receive crash report from
- Model : Fujitsu F-03K
- Android Version : 7.1.2
- Supported output sizes of ImageFormat.PRIVATE
CameraId 0 : 480x480
CameraId 1 : 2048x1536 ,1920x1080 ,1280x720 ,960x720 ,640x480 ,320x240 ,176x144
ap...@google.com <ap...@google.com> #14
I missed some settings when I simulated the issue by robolectric test so that I was not able to reproduce it. Now, I can reproduce the issue if the device only supports one 480x480 resolution. I'm working on the solution and target to make it included in next release.
ap...@google.com <ap...@google.com> #15
Branch: androidx-main
commit 69d15dff7bb857ee33a0f643ff42a0f8bc475ab2
Author: charcoalchen <charcoalchen@google.com>
Date: Fri Jan 08 18:30:03 2021
Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Do not filter out sizes smaller than 640x480 when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480.
Relnote:"Fixed IllegalArgumentException issue happened when all preview supported sizes are smaller than 640x480 and display size is larger than 640x480."
Bug: 150506192
Test: SupportedSurfaceCombinationTest
Change-Id: I2a63ce8e2ad42a9cc060c8635ac3603bf440b1ec
M camera/camera-camera2/src/main/java/androidx/camera/camera2/internal/SupportedSurfaceCombination.java
M camera/camera-camera2/src/test/java/androidx/camera/camera2/internal/SupportedSurfaceCombinationTest.java
ap...@google.com <ap...@google.com> #16
ap...@google.com <ap...@google.com> #17
Branch: androidx-main
commit 33d5114f54ef6377d5d47176581551453825134e
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 13 22:33:32 2024
Use unique Lifecycle dependency version in SavedState
* The project included, by mistake, two different lifecycle artifacts: one in the commonMain source set and the other in the androidMain source set.
Test: SavedStateRegistryTest
Bug: 334076622
Change-Id: I33cb7caeda5a5b3b0ffd4bd96985ea6e60d46f93
M savedstate/savedstate/build.gradle
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit c5c7f78edc095ca6f789b455c6cb6eb61fd89905
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Mon Sep 16 16:32:56 2024
Disable experimental Android Lint K2 UAST
* The `useK2Uast` flag in Android Lint is causing `IllegalArgumentExceptionWithAttachments` errors when analyzing `SavedState` classes that have been converted to KMP.
* Instead of suppressing these warnings, the Android Lint team has recommended disabling the experimental K2 UAST integration entirely. This change disables the `useK2Uast` flag and adds a comment referencing the related bug (
Test: N/A
Bug: 334076622
Change-Id: Iba2ab0f64f7a5418e78f017a949de47d244cb161
M savedstate/savedstate/build.gradle
ap...@google.com <ap...@google.com> #19
Branch: androidx-main
commit 1cc768070d5a75812e335581109a42ad9a7b9427
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 13 20:29:18 2024
Extract common logic to `SavedStataRegistryImpl`
* By extracting a shared `SavedStateRegistryImpl`, that enable us to migrate `SavedStateRegistry` and `Controller` to `commonMain` with different `expect` and `actual` per platform, reducing duplication and the CL diff.
Test: SavedStateRegistryTest
Bug: 334076622
Change-Id: Id064dec964ee278438909f6099a16b158d9b769f
M savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateRegistry.android.kt
M savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateRegistryController.android.kt
A savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/internal/SavedStateRegistryImpl.kt
ap...@google.com <ap...@google.com> #20
Branch: androidx-main
commit 79a1767e2fe38493991d583c84b02c4524fc8e31
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 13 20:34:36 2024
Move `SavedStateRegistry` and `Controller` to `commonMain`
RelNote: "SavedStateRegistry and SavedStateRegistryController are now KMP compatible."
Test: SavedStateRegistryTest
Bug: 334076622
Change-Id: Id7bb8064cc8bf19faade95636dd1436943056ce6
M savedstate/savedstate/bcv/native/current.txt
M savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateRegistry.android.kt
M savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateRegistryController.android.kt
A savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateRegistry.kt
A savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateRegistryController.kt
M savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateRegistryOwner.kt
M savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/internal/SavedStateRegistryImpl.kt
A savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateRegistry.nonAndroid.kt
A savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateRegistryController.nonAndroid.kt
ap...@google.com <ap...@google.com> #21
Branch: androidx-main
commit 3a82f00a1255b352441328eb85c936e33ea56843
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 11:59:40 2024
Add `android` suffix to all files from `androidMain` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: Ia5911896f02a81c45c6e79b9a33da44bc937e417
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/AbstractSavedStateViewModelFactory.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/LegacySavedStateHandleController.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandle.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleController.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.android.kt
ap...@google.com <ap...@google.com> #22
Branch: androidx-main
commit 7a5ebf9d0c904e240e92e0df38dcc774798c1541
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 11:20:32 2024
Dump native ABI in `viewmodel-savedstate`
RelNote: "ViewModel SavedState is now configured to be KMP compatible."
Test: N/A
Bug: 334076622
Change-Id: I48764a7a611bc102a08a6caf941d609e7576a350
A lifecycle/lifecycle-viewmodel-savedstate/bcv/native/current.txt
ap...@google.com <ap...@google.com> #23
Branch: androidx-main
commit 08b27e88a631e57e640a73dbdf0a2587d7b50c43
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 12:43:54 2024
Disable experimental Android Lint K2 UAST in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I07875a07c1d3d645824a2156641bbb610cc7b8eb
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
ap...@google.com <ap...@google.com> #24
Branch: androidx-main
commit fa2c57837b54211c436a252e2a19842efebfe146
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 11:57:47 2024
Rename `main` to `androidMain` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I4e3227aaf1be3b78e7b5b6d7cd97df82b216e605
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/AndroidManifest.xml
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/AbstractSavedStateViewModelFactory.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/LegacySavedStateHandleController.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandle.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleController.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.kt
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit f97adace59c8d317769ef5e7d4a194c01076d9e8
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 11:54:36 2024
Rename `androidTest` to `androidInstrumentedTest` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I7f8a411058d0e2d89e87a8ded59d67a9c83d0184
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/AndroidManifest.xml
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/SavedStateHandleParcelingTest.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/SavedStateHandleProviderTest.kt
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/SavedStateHandleSupportTest.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/SavedStateHandleTest.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/TestComponent.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/ViewModelsWithStateTest.kt
ap...@google.com <ap...@google.com> #26
Branch: androidx-main
commit 0d0a80faba7b22908f1e76f5eeeb4b9cca19061c
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 12:42:24 2024
Use `kmpDocs` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: If4af4f7c1eb9f38048e77f5d5d16770439ca823e
M docs-tip-of-tree/build.gradle
ap...@google.com <ap...@google.com> #27
Branch: androidx-main
commit 5ead08cbe81ea0f294d32a8f376a10f48cb9621c
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 10:48:58 2024
Set-up `BuildType.KMP` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: Ibf62bfaf1a1fc1516e8b43afd668383b508184a7
M settings.gradle
ap...@google.com <ap...@google.com> #28
Branch: androidx-main
commit ba34f18aea459660d5693696167c31b6ddbbfdc1
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Thu Sep 19 10:47:47 2024
Set-up KMP configurations in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I948d7db5234af0f0c76bd4abc30c82b34f29328b
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
ap...@google.com <ap...@google.com> #29
Branch: androidx-main
commit 261ed3f7932a933693fade67651e3ef1b52d41b4
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Rename `main` to `androidMain` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I6584efb8fe73e52108c75cf4cddf0e0319baac09
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/AndroidManifest.xml
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/AbstractSavedStateViewModelFactory.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/LegacySavedStateHandleController.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandle.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleController.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.kt
ap...@google.com <ap...@google.com> #30
Branch: androidx-main
commit 795e7b8af8818d85f3fd63a9ce4f979f26451b11
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Add `android` suffix to all files from `androidMain` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: Ic90439c1a5d99a949d4bf4944d3fe558dae32abf
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/AbstractSavedStateViewModelFactory.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/LegacySavedStateHandleController.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandle.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleController.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.android.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.android.kt
ap...@google.com <ap...@google.com> #31
Branch: androidx-main
commit 167b22b90fa6eeeb3758f0677555e2ac5884b4d4
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 15:21:03 2024
Move SavedStateHandleSupport internal keys to `commonMain` in `viewmodel-savedstate`
* Due to KT-52344, an empty `commonMain` source set with our current KMP configuration causes a build breakage. Moving the internal keys (`VIEWMODEL_KEY` and `SAVED_STATE_KEY`) are easy to do proactively and ensures the build does not fail.
* Please note we will convert the rest of the module in multiple follow-up CLs.
* Reference:
Test: N/A
Bug: 334076622
Change-Id: I34825bafb1195af7d333d95f46ad6290feebcec2
M lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.android.kt
A lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.kt
ap...@google.com <ap...@google.com> #32
Branch: androidx-main
commit ffdc23a5b5a562ebc37cdd283caca0637a034ddd
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Disable experimental Android Lint K2 UAST in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I7f1e66e50d54807d9c637a95a797684066993957
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
ap...@google.com <ap...@google.com> #33
Branch: androidx-main
commit a9b5cba2f3005bd311cfaace946ad3d64c55b094
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Use `kmpDocs` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: Icd9cfeee9a7b603b187e6c597271339d2a444c07
M docs-tip-of-tree/build.gradle
ap...@google.com <ap...@google.com> #34
Branch: androidx-main
commit c9f50467a2eea8726582b428769eb26d376bd3a4
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Rename `androidTest` to `androidInstrumentedTest` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: Ie0b617397b023f9cf8c067271f6827741e8ca6d4
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/AndroidManifest.xml
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/SavedStateHandleParcelingTest.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/SavedStateHandleProviderTest.kt
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/SavedStateHandleSupportTest.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/SavedStateHandleTest.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/TestComponent.kt
M lifecycle/lifecycle-viewmodel-savedstate/src/androidInstrumentedTest/kotlin/androidx/lifecycle/viewmodel/savedstate/ViewModelsWithStateTest.kt
ap...@google.com <ap...@google.com> #35
Branch: androidx-main
commit 736ec1d65d3ff6898719a33432b83f845bef2e64
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Set-up KMP configurations in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: I57c860fe40aa9ff6ff6e321ee9881e57faea7840
M lifecycle/lifecycle-viewmodel-savedstate/build.gradle
ap...@google.com <ap...@google.com> #36
Branch: androidx-main
commit 0caa028d83f488d0c7b845565f5366ee662aa522
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Dump native ABI in `viewmodel-savedstate`
RelNote: "ViewModel SavedState is now configured to be KMP compatible."
Test: N/A
Bug: 334076622
Change-Id: I503edb3551108b6c4877c17767a787dda4aaaf4c
A lifecycle/lifecycle-viewmodel-savedstate/bcv/native/current.txt
ap...@google.com <ap...@google.com> #37
Branch: androidx-main
commit b82c31c48b26e66c66b60925e2a26813a6b161db
Author: Marcello Galhardo <mgalhardo@google.com>
Date: Fri Sep 20 08:51:52 2024
Set-up `BuildType.KMP` in `viewmodel-savedstate`
Test: N/A
Bug: 334076622
Change-Id: Ibe243694a50542c7977018cf4183c8ecde6075f4
M settings.gradle
ap...@google.com <ap...@google.com> #38
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Disable Metalava K2's UAST in savedstate
Expand for full commit details
Disable Metalava K2's UAST in `savedstate`
* Currently, resolving JVM annotations from the common source set in K2 is not functioning correctly. This is due to the absence of a common source JAR containing the necessary annotations. Disabling UAST allows Metalava to continue operating while we address the underlying issue with annotation resolution in Metalava.
Test: N/A
Bug: 334076622
Change-Id: I61396dcb8b28fb545ea625c7d4408969e7259039
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/build.gradle
Hash: e01363eb9b9866ece101e46e1d9bb122e5d25ebe
Date: Fri Oct 04 22:13:59 2024
mg...@google.com <mg...@google.com> #39
We have created
ap...@google.com <ap...@google.com> #40
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add Long
support to Saved State KMP
Expand for full commit details
Add `Long` support to Saved State KMP
RelNote: "SavedState KMP now supports Long."
Test: SavedStateTest
Bug: 334076622
Change-Id: I4c180e12c8259436628e5b6b62a0dfa38f003be6
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/internal/SavedStateUtils.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: cce3e22b1e9d5b3932236e96bc882b2fb056a10e
Date: Thu Oct 17 14:49:13 2024
ap...@google.com <ap...@google.com> #41
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix SavedStateReader.get*OrElse
not returning defaultValue
for primitives
Expand for full commit details
Fix `SavedStateReader.get*OrElse` not returning `defaultValue` for primitives
Test: SavedStateTest
Bug: 334076622
Change-Id: Ic1d74cda55075f87718a0e4315fd6f64465276ca
Files:
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidUnitTest/kotlin/androidx/savedstate/ParcelableSavedStateTest.android.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
Hash: 792010e1704764e91abb256be96d340587d38bd6
Date: Mon Oct 21 19:47:27 2024
ap...@google.com <ap...@google.com> #42
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add contentDeepEquals
to Saved State
Expand for full commit details
Add `contentDeepEquals` to Saved State
RelNote: "SavedState KMP now supports `contentDeepEquals` comparison."
Test: SavedStateTest
Bug: 334076622
Change-Id: Ia515c97b16e17bcb8a20dafbc043cf2d971c4405
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
Hash: a080e2c245d7b896f5f0a45f12b87b9f07858a75
Date: Thu Oct 17 15:53:34 2024
ap...@google.com <ap...@google.com> #43
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add additional savedState
factory functions
Expand for full commit details
Add additional `savedState` factory functions
RelNote: "Add additional `savedState` factory parameters supporting an initial `Map<String, Any>`"
Test: SavedStateTest
Bug: 334076622
Change-Id: I9b37da20978bc549e1ab5c354985aa4ca450f6be
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedState.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedState.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedState.nonAndroid.kt
Hash: d5bd36accebb332017f303381c21502b14766d67
Date: Tue Oct 22 19:15:28 2024
ap...@google.com <ap...@google.com> #44
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add support for marking a key as a null
reference in SavedState
Expand for full commit details
Add support for marking a key as a `null` reference in `SavedState`
* When encoding/decoding data that contains properties that are both nullable and has default values, we need a way to identify both.
RelNote: "Add `putNull` and `isNull` to SavedState KMP."
Test: SavedStateTest
Bug: 334076622
Change-Id: Iea71d9d8652c9cbd45e701d5b4785579acd73969
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedState.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedState.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedState.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: 906259e5143e561e6babe52542348d8e929bf72e
Date: Wed Oct 23 16:01:37 2024
ap...@google.com <ap...@google.com> #45
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add Char
support to Saved State KMP
Expand for full commit details
Add `Char` support to Saved State KMP
RelNote: "SavedState KMP now supports Char."
Test: SavedStateTest
Bug: 334076622
Change-Id: I9ac2ff6589371bd4bc79b1910334ce24710cd176
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/internal/SavedStateUtils.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: 13fd10604738a3af38ba1ac99d11343a071a8e75
Date: Fri Oct 18 17:41:54 2024
ap...@google.com <ap...@google.com> #46
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Remove unused Writer.read
/Reader.write
methods from SavedState to avoid confusion
Expand for full commit details
Remove unused `Writer.read`/`Reader.write` methods from SavedState to avoid confusion
RelNote: "Remove unused methods."
Test: SavedStateTest
Bug: 334076622
Change-Id: Ib63477d99028dd517b070af089409b7a3e433ac6
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedState.kt
Hash: bd92701e50e46ef3486ce5b4e27c0426958c3ca7
Date: Wed Oct 23 21:40:46 2024
ap...@google.com <ap...@google.com> #47
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Remove unused reader()
/writer()
methods from SavedState to avoid confusion
Expand for full commit details
Remove unused `reader()`/`writer()` methods from SavedState to avoid confusion
* Keeping a reference to a writer or reader, can force Kotlin to box the `SavedState`.
* Include a warning making sure holding the reference is not recommended/supported.
RelNote: "Remove unused methods."
Test: SavedStateTest
Bug: 334076622
Change-Id: I1b49071b8db2500379e753713dbfc02f48f06d53
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedState.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
Hash: c31394126331102a173864757bca3be9360fd6d0
Date: Wed Oct 23 21:34:13 2024
ap...@google.com <ap...@google.com> #48
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add Array
support to Saved State KMP
Expand for full commit details
Add `Array` support to Saved State KMP
RelNote: "SavedState KMP now supports Arrays."
Test: SavedStateTest
Bug: 334076622
Change-Id: Ic0552cac5744d8422524d8219438a6571f70c476
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: 1c48caff1cf283d29de06a80c0924975e4d2851b
Date: Thu Oct 24 16:22:38 2024
ap...@google.com <ap...@google.com> #49
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add toMap
to SavedState
Expand for full commit details
Add `toMap` to `SavedState`
* Allows a `SavedState` to be converted into a map.
* Deep copy: any nested `SavedState` will be converted into a map too.
RelNote: "Add `toMap` to SavedState."
Test: N/A
Bug: 334076622
Change-Id: I487b901051ad68a3e27f9a5550fd7336734abbb1
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
Hash: cd3236939c7139539e19f7b7c043b93c8f7446e4
Date: Thu Oct 24 16:12:28 2024
ap...@google.com <ap...@google.com> #50
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Commonize SavedStateHandle
Expand for full commit details
Commonize `SavedStateHandle`
Test: SavedStateHandleTest
Bug: 334076622
Change-Id: I80f3a7bb79ae4e4eb239076c3ff2da219ab43e38
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandle.android.kt
- A
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateHandle.kt
- A
lifecycle/lifecycle-viewmodel-savedstate/src/nonAndroidMain/kotlin/androidx/lifecycle/SavedStateHandle.nonAndroid.kt
Hash: 89b9ba6bc6aaa6958bd5d5ee4fa42e475b0168e2
Date: Thu Oct 10 16:50:45 2024
ap...@google.com <ap...@google.com> #51
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Commonize SavedStateHandleController
Expand for full commit details
Commonize `SavedStateHandleController`
Test: N/A
Bug: 334076622
Change-Id: Ic0c6c091cd72ec0faf8fc56a6f19caf77911f088
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateHandleController.kt
Hash: eb03b9169ce0c387cb8e63f8239247da1b7237c4
Date: Thu Oct 10 18:43:02 2024
ap...@google.com <ap...@google.com> #52
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Remove recursive behaviour from toMap
in SavedState
Expand for full commit details
Remove recursive behaviour from `toMap` in `SavedState`
RelNote: "N/A"
Test: N/A
Bug: 334076622
Change-Id: Ic5b39c79119de5337dd478fdf1a30975d5520287
Files:
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
Hash: 549d78495308320863ed7332b668b0edf1c3e9c1
Date: Fri Oct 25 15:41:13 2024
ap...@google.com <ap...@google.com> #53
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Commonize SavedStateViewModelFactory
Expand for full commit details
Commonize `SavedStateViewModelFactory`
Test: N/A
Bug: 334076622
Change-Id: I9d2f206705523cb5c73a09f11a2522e9bae36150
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.android.kt
- A
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.kt
- A
lifecycle/lifecycle-viewmodel-savedstate/src/nonAndroidMain/kotlin/androidx/lifecycle/SavedStateViewModelFactory.nonAndroid.kt
Hash: 73c35c37407f120469a46a16d068f55fd8f6966e
Date: Thu Oct 10 18:43:56 2024
ap...@google.com <ap...@google.com> #54
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Commonize SavedStateHandleSupport
Expand for full commit details
Commonize `SavedStateHandleSupport`
Test: SavedStateHandleSupportTest
Bug: 334076622
Change-Id: I8b85f3fde27969950304823c376d09bf0de43843
Files:
- D
lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.android.kt
- M
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/SavedStateHandleSupport.kt
Hash: aa7c9debe2caacd582e3db8004fdda5e37b0fdcd
Date: Wed Oct 16 17:42:16 2024
ap...@google.com <ap...@google.com> #55
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add SavedStateHandleImpl
Expand for full commit details
Add `SavedStateHandleImpl`
* The new class will hold the data and logic from `SavedStateHandle`, and will be used by all platforms to share code.
Test: N/A
Bug: 334076622
Change-Id: I9c384017a701a3ffe9491f2619dd3d13b41398f6
Files:
- A
lifecycle/lifecycle-viewmodel-savedstate/src/androidMain/kotlin/androidx/lifecycle/internal/SavedStateHandleImpl.android.kt
- A
lifecycle/lifecycle-viewmodel-savedstate/src/commonMain/kotlin/androidx/lifecycle/internal/SavedStateHandleImpl.kt
- A
lifecycle/lifecycle-viewmodel-savedstate/src/nonAndroidMain/kotlin/androidx/lifecycle/internal/SavedStateHandleImpl.nonAndroid.kt
Hash: adee1372b3a047fec3677de18952352af612c409
Date: Mon Oct 14 15:50:44 2024
ap...@google.com <ap...@google.com> #56
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Bump ViewModel SavedState ABI
Expand for full commit details
Bump ViewModel SavedState ABI
RelNote: "Lifecycle ViewModel SavedState is now KMP compatible"
Test: N/A
Bug: 334076622
Change-Id: Ib63947f53600724de5ebf6c0e64c17c305592b2f
Files:
- M
lifecycle/lifecycle-viewmodel-savedstate/bcv/native/current.txt
Hash: ad0f2909d0413719c1dcd53403aa7d52e36fc3d8
Date: Thu Oct 10 18:46:15 2024
mg...@google.com <mg...@google.com>
ap...@google.com <ap...@google.com> #57
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Clean up SavedState KMP Implementation
Expand for full commit details
Clean up SavedState KMP Implementation
* Annotate constructors from `SavedStateWriter` and `SavedStateReader` in `common`, `android` and `nonAndroid` with `@PublishedApi`. Kotlin 1.9 introduces a warning if the expect and actual methods aren't annotated with `@PublishedApi`
* All methods and constants in the `SavedState` are `@Published internal`, which are tracked by our tooling as a public API. By reducing the number of `@Published`, there is less APIs to maintain.
* As everything is flag as `inline`, I have moved the suppression to `file:Suppress`.
* For Android and JVM, included a `file:JvmName`, as class were inconsistent due to `.android` and `.nonAndroid` suffix.
* The original `getSingleResultOrThrow` function was created to share behavior between platforms. However, due to how default values work for primitives in `Bundle`, the original abstraction wasn't that useful for sharing code and created multiple levels of calls that was difficult to debug.
* The original `getSingleResultOrElse` function was designed to handle generic lists. Since we've decided not to support generic lists and instead use typed lists (e.g., `List<Int>` instead of `List<T>`), this function became redundant with `getSingleResultOrThrow`.
* The `SavedStateUtils` class was only used in the `SavedStateReader`. Its contents have been moved directly into the reader, and the class deleted.
* The `keyNotFoundError` function now throws an `IllegalArgumentException` as it's caused by an invalid key provided by the caller.
* The `valueNotFoundError` function throws an `IllegalStateException` as it indicates an inconsistency between the key and the internal state.
* The error messages for `keyNotFoundError` and `valueNotFoundError` have been improved for clarity.
RelNote: "N/A"
Test: SavedStateTest
Bug: 334076622
Change-Id: I55971ae2560300408153eea5eef7ec96fb70c7ce
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedState.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- M
savedstate/savedstate/src/androidUnitTest/kotlin/androidx/savedstate/ParcelableSavedStateTest.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedState.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- D
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/internal/SavedStateUtils.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedState.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: 422d9d54c4c3cd79b2f380ae4b90412d53c6b2d2
Date: Mon Oct 28 16:30:02 2024
pr...@google.com <pr...@google.com> #58
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.savedstate:savedstate:1.3.0-alpha04
androidx.savedstate:savedstate-android:1.3.0-alpha04
androidx.savedstate:savedstate-desktop:1.3.0-alpha04
androidx.savedstate:savedstate-iosarm64:1.3.0-alpha04
androidx.savedstate:savedstate-iossimulatorarm64:1.3.0-alpha04
androidx.savedstate:savedstate-iosx64:1.3.0-alpha04
androidx.savedstate:savedstate-linuxarm64:1.3.0-alpha04
androidx.savedstate:savedstate-linuxx64:1.3.0-alpha04
androidx.savedstate:savedstate-macosarm64:1.3.0-alpha04
androidx.savedstate:savedstate-macosx64:1.3.0-alpha04
ap...@google.com <ap...@google.com> #59
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add contentDeepHashCode
to Saved State
Expand for full commit details
Add `contentDeepHashCode` to Saved State
RelNote: "SavedState KMP now supports `contentDeepHashCode`."
Test: SavedStateTest
Bug: 334076622
Change-Id: I4d9f7de7d26b78c592660e2ab137c593667b7675
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
Hash: a253a5a1f79b8d2b382cbc7deaa2bc35caa1156b
Date: Fri Nov 08 16:38:22 2024
na...@google.com <na...@google.com> #60
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> #61
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Add Android specific types to SavedState
reader and writer
Expand for full commit details
Add Android specific types to `SavedState` reader and writer
* Include support to Android specific types: Binder, Size, SizeF,
ParcelableArray and SparseParcelableArray.
* Include support to JVM specific type: Serializable.
* Include support to common type: CharSequence.
* Note that Serializable is currently only available on Android.
RelNote: "SavedState KMP now supports: IBinder, Size, SizeF,
Array<Parcelable>, SparseArray<Parcelable> and Serializable (Android)."
Test: SavedStateAndroidTest.android.kt
Bug: 334076622
Change-Id: I1ba9446ed4dad6e018cbf17feaef1f5fcdeb6c3f
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/bcv/native/current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- D
savedstate/savedstate/src/androidUnitTest/kotlin/androidx/savedstate/ParcelableSavedStateTest.android.kt
- A
savedstate/savedstate/src/androidUnitTest/kotlin/androidx/savedstate/SavedStateAndroidTest.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateReader.nonAndroid.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: 9ee8e41f9514ff07ee88a6e56cb14dcea5e3087d
Date: Mon Nov 11 11:46:22 2024
ap...@google.com <ap...@google.com> #62
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Fix KDocs throws
in SavedStateReader
Expand for full commit details
Fix KDocs `throws` in `SavedStateReader`
RelNote: "N/A"
Test: SavedStateTest.android.kt
Bug: 334076622
Change-Id: I359ae160033f1cd50412ac9974fc0e8fa2816059
Files:
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateReader.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateReader.kt
Hash: 5d429c768e391200c9b698e7fd59e68e61b274d2
Date: Fri Nov 15 15:13:12 2024
ap...@google.com <ap...@google.com> #63
Project: platform/frameworks/support
Branch: androidx-main
Author: Marcello Galhardo <
Link:
Rename values
to value
in SavedStateWriter
Expand for full commit details
Rename `values` to `value` in `SavedStateWriter`
* Rename `values` argument to `value` in `SavedStateWriter` to match naming used by `Bundle`.
* Rename `values` to `from` in `putAll` to match naming convention from `Map` interface.
RelNote: "N/A"
Test: SavedStateTest.android.kt
Bug: 334076622
Change-Id: Icc4665ded332b2a9e128f2d55d0c032e1aa1898b
Files:
- M
savedstate/savedstate/api/current.txt
- M
savedstate/savedstate/api/restricted_current.txt
- M
savedstate/savedstate/src/androidMain/kotlin/androidx/savedstate/SavedStateWriter.android.kt
- M
savedstate/savedstate/src/commonMain/kotlin/androidx/savedstate/SavedStateWriter.kt
- M
savedstate/savedstate/src/commonTest/kotlin/androidx/savedstate/SavedStateTest.kt
- M
savedstate/savedstate/src/nonAndroidMain/kotlin/androidx/savedstate/SavedStateWriter.nonAndroid.kt
Hash: 83e439f7919c35bcb000d6468afe53c187ab4dc5
Date: Fri Nov 15 14:45:38 2024
pr...@google.com <pr...@google.com> #64
The following release(s) address this bug.It is possible this bug has only been partially addressed:
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
Our goal is to convert
androidx.savedstate
to Kotlin Multiplatform without portingandroid.os.Bundle
(which should be an internal implementation detail). We plan to leverage the existingrememberSaveable
andSaver
API as a foundation and extend its availability beyond Compose. To ensure backward compatibility, we'll try to redirect the currentrememberSaveable
API to our newly extracted implementation.Further investigation is needed to assess the full viability of these ideas.