Fixed
Status Update
Comments
pb...@google.com <pb...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit b6f920cbc24f2e12ba3f881a2d61f7e845e9797e
Author: Ian Lake <ilake@google.com>
Date: Fri Nov 19 14:48:01 2021
Avoid saving an empty Bundle for SavedStateRegistry
When performSave() is called, SavedStateRegistry
might actually not have anything to save. In those
cases, it should avoid adding an empty Bundle to
the outBundle.
This allows systems that use SavedStateRegistry
(such as Fragments) to use Bundle.isEmpty() as a
sign on whether it needs to add its Bundle, etc.
Test: new SavedStateRegistryTest test
BUG: 203457956
Change-Id: Ib49bd8645a5d4e38de329e50fe659b1baf7fcba3
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistry.java
M savedstate/savedstate/src/androidTest/java/androidx/savedstate/SavedStateRegistryTest.kt
https://android-review.googlesource.com/1896865
Branch: androidx-main
commit b6f920cbc24f2e12ba3f881a2d61f7e845e9797e
Author: Ian Lake <ilake@google.com>
Date: Fri Nov 19 14:48:01 2021
Avoid saving an empty Bundle for SavedStateRegistry
When performSave() is called, SavedStateRegistry
might actually not have anything to save. In those
cases, it should avoid adding an empty Bundle to
the outBundle.
This allows systems that use SavedStateRegistry
(such as Fragments) to use Bundle.isEmpty() as a
sign on whether it needs to add its Bundle, etc.
Test: new SavedStateRegistryTest test
BUG: 203457956
Change-Id: Ib49bd8645a5d4e38de329e50fe659b1baf7fcba3
M savedstate/savedstate/src/main/java/androidx/savedstate/SavedStateRegistry.java
M savedstate/savedstate/src/androidTest/java/androidx/savedstate/SavedStateRegistryTest.kt
to...@gmail.com <to...@gmail.com> #3
Yes that what I tried to implement myself but was blocked by the internal DayNightColorProvider preventing casting and calling resolve on it.
za...@google.com <za...@google.com> #4
Willie to look if there is an easy way to expose the provider.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 025ca1611036a7ca409b6cf951b1a31ca0ebadc9
Author: Willie Koomson <wvk@google.com>
Date: Mon Mar 14 19:36:00 2022
Add ColorProvider.resolve()
This change adds a resolve() function to the ColorProvider interface,
which returns what color the provider will use in the given context.
Bug: 214733442
Test: ColorProviderTest
Relnote: Add ColorProvider.resolve()
Change-Id: Ife532c3a9d5093c727a979e56847915fe36a83ca
M glance/glance-appwidget/src/test/kotlin/androidx/glance/appwidget/unit/ColorProviderTest.kt
M glance/glance-appwidget/src/test/res/values/colors.xml
M glance/glance/src/androidMain/kotlin/androidx/glance/unit/ColorProvider.kt
M glance/glance-wear-tiles/src/androidMain/kotlin/androidx/glance/wear/tiles/WearCompositionTranslator.kt
M glance/glance/api/current.txt
M glance/glance/api/public_plus_experimental_current.txt
M glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/translators/TextTranslator.kt
M glance/glance/api/restricted_current.txt
M glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/unit/ColorProvider.kt
https://android-review.googlesource.com/2025248
Branch: androidx-main
commit 025ca1611036a7ca409b6cf951b1a31ca0ebadc9
Author: Willie Koomson <wvk@google.com>
Date: Mon Mar 14 19:36:00 2022
Add ColorProvider.resolve()
This change adds a resolve() function to the ColorProvider interface,
which returns what color the provider will use in the given context.
Bug: 214733442
Test: ColorProviderTest
Relnote: Add ColorProvider.resolve()
Change-Id: Ife532c3a9d5093c727a979e56847915fe36a83ca
M glance/glance-appwidget/src/test/kotlin/androidx/glance/appwidget/unit/ColorProviderTest.kt
M glance/glance-appwidget/src/test/res/values/colors.xml
M glance/glance/src/androidMain/kotlin/androidx/glance/unit/ColorProvider.kt
M glance/glance-wear-tiles/src/androidMain/kotlin/androidx/glance/wear/tiles/WearCompositionTranslator.kt
M glance/glance/api/current.txt
M glance/glance/api/public_plus_experimental_current.txt
M glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/translators/TextTranslator.kt
M glance/glance/api/restricted_current.txt
M glance/glance-appwidget/src/androidMain/kotlin/androidx/glance/appwidget/unit/ColorProvider.kt
Description
Component used: glance-appwidget Version used: 1.0 alpha1
It would be nice to be able to manually resolve ColorProvider to avoid code duplication. It's currently not possible as the DayNight provider is internal.
This is useful to modify the colors to add alpha (like disabled status) or manually apply tint since the API does not yet support it.