Fixed
Status Update
Comments
il...@google.com <il...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit ff83342e064a03ea410b31f825786c28d009354f
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Nov 16 08:17:07 2021
Allow nullable boolean array in safe args
While you should not be able to give a boolean a default value of null
you should be able to make an array default to null. We need to enable
safe args to generate boolean array with nullable values.
RelNote: "Fixed a bug in safe args that would not allow boolean arrays
to have a `null` value."
Test: modified NavParserTest
Bug: 174787525
Change-Id: I8c396c8f174d5924bb5ee147261de158256fba94
M navigation/navigation-safe-args-generator/src/test/test-data/naive_test.xml
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/Types.kt
M navigation/navigation-safe-args-generator/src/test/kotlin/androidx/navigation/safe/args/generator/NavParserTest.kt
https://android-review.googlesource.com/1893757
Branch: androidx-main
commit ff83342e064a03ea410b31f825786c28d009354f
Author: Jeremy Woods <jbwoods@google.com>
Date: Tue Nov 16 08:17:07 2021
Allow nullable boolean array in safe args
While you should not be able to give a boolean a default value of null
you should be able to make an array default to null. We need to enable
safe args to generate boolean array with nullable values.
RelNote: "Fixed a bug in safe args that would not allow boolean arrays
to have a `null` value."
Test: modified NavParserTest
Bug: 174787525
Change-Id: I8c396c8f174d5924bb5ee147261de158256fba94
M navigation/navigation-safe-args-generator/src/test/test-data/naive_test.xml
M navigation/navigation-safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/Types.kt
M navigation/navigation-safe-args-generator/src/test/kotlin/androidx/navigation/safe/args/generator/NavParserTest.kt
jb...@google.com <jb...@google.com> #3
This has been fixed internally and will be available in the next Navigation release. You can try it out now by following the #7920634
.
Description
Using androidx.navigation:navigation-safe-args-gradle-plugin:2.3.2
when if compile my projet with a boolean array argument and set its default value to @null
I get an error:
Although documentation do not mention any problem with boolean array and explicitly mention that any array argument can have only one default value "@null".https://developer.android.com/guide/navigation/navigation-pass-data#supported_argument_types