Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 20409b693f12cb4de92aeb9697bf179cb3a069a2
Author: Matthew Fraschilla <fraschilla@google.com>
Date: Fri Sep 20 16:52:11 2019
Add toString override for NavDestination and all subclasses
Test: new tests pass
FIXES=141264986
Change-Id: I1019fd7f15024ea884db96ca2094d4efdb23b310
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphAndroidTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestination.java
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraph.java
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/ActivityNavigatorTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/ActivityNavigator.java
https://android-review.googlesource.com/1127357
https://goto.google.com/android-sha1/20409b693f12cb4de92aeb9697bf179cb3a069a2
Branch: androidx-master-dev
commit 20409b693f12cb4de92aeb9697bf179cb3a069a2
Author: Matthew Fraschilla <fraschilla@google.com>
Date: Fri Sep 20 16:52:11 2019
Add toString override for NavDestination and all subclasses
Test: new tests pass
FIXES=141264986
Change-Id: I1019fd7f15024ea884db96ca2094d4efdb23b310
M navigation/navigation-common/src/androidTest/java/androidx/navigation/NavGraphAndroidTest.kt
M navigation/navigation-common/src/main/java/androidx/navigation/NavDestination.java
M navigation/navigation-common/src/main/java/androidx/navigation/NavGraph.java
M navigation/navigation-fragment/src/androidTest/java/androidx/navigation/fragment/FragmentNavigatorTest.kt
M navigation/navigation-fragment/src/main/java/androidx/navigation/fragment/FragmentNavigator.java
M navigation/navigation-runtime/src/androidTest/java/androidx/navigation/ActivityNavigatorTest.kt
M navigation/navigation-runtime/src/main/java/androidx/navigation/ActivityNavigator.java
Description
Version used: 2.2.0-alpha03
To aid with debugging, it would be really helpful if we implemented toString() on NavDestination and its subclasses:
- NavDestination would print the idName if it exists and id otherwise, followed by the label
- NavGraph would call super.toString() and output the start destination (the ID if we don't have the start destination in the nodes)
- FragmentNavigator.Destination would also print the class name
- ActivityNavigator.Destination would also print the class name
This wouldn't output all of the information in each destination (that would be too much), but it would be enough to identify the destination in your graph