Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit f85de8f1f4a1f025bcd6ae566c9ce3b4c8f1f06c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jan 24 16:28:34 2019
Use fully qualified ClassName for action method return names.
Using complete ClassName for action return types helps child direction
classes correctly generate their inherited action method. More precisely
it allows for deep nested direction classes to correctly import the
inner NavDirection class generated in a grandfather direction class.
Bug: 123347762
Test: ./gradlew navigation:navigation-safe-args-gradle-plugin:test \
navigation:navigation-safe-args-generator:test
Change-Id: I62a0b10b33bfe496d930782a7ef0d7269a75df96
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/nested_overridden_action_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project-kotlin/src/main/res/navigation/nav_nested_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project/src/main/res/navigation/nav_nested_test.xml
https://android-review.googlesource.com/885199
https://goto.google.com/android-sha1/f85de8f1f4a1f025bcd6ae566c9ce3b4c8f1f06c
Branch: androidx-master-dev
commit f85de8f1f4a1f025bcd6ae566c9ce3b4c8f1f06c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Thu Jan 24 16:28:34 2019
Use fully qualified ClassName for action method return names.
Using complete ClassName for action return types helps child direction
classes correctly generate their inherited action method. More precisely
it allows for deep nested direction classes to correctly import the
inner NavDirection class generated in a grandfather direction class.
Bug: 123347762
Test: ./gradlew navigation:navigation-safe-args-gradle-plugin:test \
navigation:navigation-safe-args-generator:test
Change-Id: I62a0b10b33bfe496d930782a7ef0d7269a75df96
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/java/JavaNavWriter.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/InnerSettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/java/nested_overridden_action/SettingsFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/InnerSettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsDirections.kt
M navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/kotlin/nested_overridden_action/SettingsFragmentDirections.kt
M navigation/safe-args-generator/src/tests/test-data/nested_overridden_action_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project-kotlin/src/main/res/navigation/nav_nested_test.xml
M navigation/safe-args-gradle-plugin/src/test/test-data/app-project/src/main/res/navigation/nav_nested_test.xml
Description
Version used: 1.0.0-alpha06
Navigation has the ability to set a default graph from your manifest via NavController.setMetadataGraph() and NavInflater.inflateMetadataGraph().
The existence of this API promotes bad patterns (automatic defaults that reside far from the code invoking it) and can outright break other functionality such as setting a programmatically inflated NavGraph onto a NavHostFragment (as NavHostFragment will use the metadata graph by default, calling setGraph with the wrong graph).
These API should be removed entirely to prevent issues - developers should call NavHostFragment.create() or call setGraph() with exactly the graph they want.