Fixed
Status Update
Comments
am...@gmail.com <am...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 05f347890c62aaf1f585b9adbbeb75832d3c8b2c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 27 17:05:17 2018
Make Nav Direction classes extend top level Direction classes.
Directions classes who's destination is contained in a nav graph with
top level actions will now extend the nav graph's direction class
enabling global actions to be available to lower layers of the graph.
Bug: 79871405
Test: ./gradlew :navigation:navigation-safe-args-generator:test
Change-Id: Id59d8547dacb33c0d75ddd282754d87b499c2b9b
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/GeneratorOutput.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavSafeArgsGenerator.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavWriter.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/ext/NavJavaPoet_ext.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavGeneratorTest.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavParserTest.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavWriterTest.kt
A navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/TestUtils.kt
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/LoginDirections.java
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/LoginFragmentDirections.java
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/MainFragmentDirections.java
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/RegisterFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/Finish.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/MainFragmentArgs.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/MainFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/Next.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/SanitizedMainFragmentArgs.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/SanitizedMainFragmentDirections.java
A navigation/safe-args-generator/src/tests/test-data/nested_login_test.xml
M navigation/safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/ArgumentsGenerationTask.kt
https://android-review.googlesource.com/739287
https://goto.google.com/android-sha1/05f347890c62aaf1f585b9adbbeb75832d3c8b2c
Branch: androidx-master-dev
commit 05f347890c62aaf1f585b9adbbeb75832d3c8b2c
Author: Daniel Santiago Rivera <danysantiago@google.com>
Date: Mon Aug 27 17:05:17 2018
Make Nav Direction classes extend top level Direction classes.
Directions classes who's destination is contained in a nav graph with
top level actions will now extend the nav graph's direction class
enabling global actions to be available to lower layers of the graph.
Bug: 79871405
Test: ./gradlew :navigation:navigation-safe-args-generator:test
Change-Id: Id59d8547dacb33c0d75ddd282754d87b499c2b9b
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/GeneratorOutput.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavSafeArgsGenerator.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/NavWriter.kt
M navigation/safe-args-generator/src/main/kotlin/androidx/navigation/safe/args/generator/ext/NavJavaPoet_ext.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavGeneratorTest.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavParserTest.kt
M navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/NavWriterTest.kt
A navigation/safe-args-generator/src/tests/kotlin/androidx/navigation/safe/args/generator/TestUtils.kt
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/LoginDirections.java
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/LoginFragmentDirections.java
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/MainFragmentDirections.java
A navigation/safe-args-generator/src/tests/test-data/expected/nav_generator_test/RegisterFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/Finish.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/MainFragmentArgs.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/MainFragmentDirections.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/Next.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/SanitizedMainFragmentArgs.java
M navigation/safe-args-generator/src/tests/test-data/expected/nav_writer_test/SanitizedMainFragmentDirections.java
A navigation/safe-args-generator/src/tests/test-data/nested_login_test.xml
M navigation/safe-args-gradle-plugin/src/main/kotlin/androidx/navigation/safeargs/gradle/ArgumentsGenerationTask.kt
bo...@google.com <bo...@google.com> #3
d4...@gmail.com <d4...@gmail.com> #4
Doesn't seem to be fixed in 1.0.1.
Description
Path:
/extSdCard/_documentTest
Uri:
content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A_documentTest
SingleDocumentFile doesn't support any write features, so we are left with TreeDocumentFile which is created with:
public static DocumentFile fromTreeUri(Context context, Uri treeUri) {
final int version = Build.VERSION.SDK_INT;
if (version >= 21) {
return new TreeDocumentFile(null, context,
DocumentsContractApi21.prepareTreeUri(treeUri));
} else {
return null;
}
}
However DocumentsContractApi21.prepareTreeUri(treeUri) truncates the document id returning a DocumentFile pointing to:
content://com.android.externalstorage.documents/tree/0000-0000%3A/document/0000-0000%3A
This is NOT the same URI! It simply truncated this URI down to the tree root...
I cannot see a workaround without reflection into TreeDocumentFile.