Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 1e5efa0794e826bc1b3b153796ed5659fb97fca2
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 08 10:23:54 2019
Prefer exact matching deep links
Instead of only taking into account the
number of matching arguments for deep link
matching, always prefer exact matches.
Test: updated tests
BUG: 123969518
Change-Id: Ibd8ab5b6ba251991fa994ebd297bcb9ffb5851bd
M navigation/common/src/androidTest/java/androidx/navigation/NavDestinationAndroidTest.kt
M navigation/common/src/androidTest/java/androidx/navigation/NavGraphAndroidTest.kt
M navigation/common/src/main/java/androidx/navigation/NavDeepLink.java
M navigation/common/src/main/java/androidx/navigation/NavDestination.java
https://android-review.googlesource.com/898367
https://goto.google.com/android-sha1/1e5efa0794e826bc1b3b153796ed5659fb97fca2
Branch: androidx-master-dev
commit 1e5efa0794e826bc1b3b153796ed5659fb97fca2
Author: Ian Lake <ilake@google.com>
Date: Fri Feb 08 10:23:54 2019
Prefer exact matching deep links
Instead of only taking into account the
number of matching arguments for deep link
matching, always prefer exact matches.
Test: updated tests
BUG: 123969518
Change-Id: Ibd8ab5b6ba251991fa994ebd297bcb9ffb5851bd
M navigation/common/src/androidTest/java/androidx/navigation/NavDestinationAndroidTest.kt
M navigation/common/src/androidTest/java/androidx/navigation/NavGraphAndroidTest.kt
M navigation/common/src/main/java/androidx/navigation/NavDeepLink.java
M navigation/common/src/main/java/androidx/navigation/NavDestination.java
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.