This repository was archived by the owner on Feb 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 57
Add some .idea files to the repo #38
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This adds a few files from the .idea directory to the repo, based on the .gitignore (and some settings) from AndroidX.
yrezgui
approved these changes
Jul 12, 2021
yrezgui
pushed a commit
that referenced
this pull request
Jul 12, 2021
This adds a few files from the .idea directory to the repo, based on the .gitignore (and some settings) from AndroidX.
yrezgui
added a commit
that referenced
this pull request
Jul 15, 2021
* Import proof-of-concept ContentFileSystemProvider A proof-of-concept java.nio.file.spi.FileSystemProvider implementation for working with `content://` scheme URIs. The very basic implementation supports use of `Files.walk()` and the `Path` objects returned can be passed directly to `okio` methods. The implementation includes a token set of tests due to the way content:// uri access is usually granted (via the system file picker). Currently working on how to write more useful cases. * Sample scaffolding Adds scaffolding for a demo of the filesystem library. * Minor update for ExternalStoragePath Delegate the `isTree` method to `ContentPath`. * Add test case for single document Adds a pair of test cases for a single document Path. Creating a Uri that's used with DocumentsContract to connect to a test DocumentProvider and return content. * Add check for "root" Add a check for a Root.MIME_TYPE_ITEM for deciding if a document is a directory or not. * Improve test cases - Builds a DocumentsProvider for testing the filesystem code with ContentResolver. - Built a small DSL to allow creating a document tree for test cases that doesn't rely on creating files. * Add basic test for Files.walk Builds up the TestDocumentProvider to support operations needed for walking a tree. * Extract Android classes This changes the implementation to extract all the Android specific calls from the main FileSystem classes so that we'll be able to write host side unit tests that run without Android/Robolectric. NOTE: Technically there are a couple of methods left, but they're more difficult to extract in a clean way at the moment, so I've left them. In ExternalStoragePath: - android.os.Environment#getExternalStorageDirectory() - android.os.Process#myPid() * Host side tests First set of host side tests for ContentFileSystemProvider et al. * Update copyright Switch copyright from AOSP to Google LLC (to match the rest of ModernStorage). * Remove debug log statements * Register FileSystem "roots" Register URIs when an instance of a ContentFileSystem is created, and allow retrieving them with `ContentFileSystem.getRootDirectories()` * Minor update to test code * Refactoring Refactors some of the provider specific methods to the FileSystem level (which are backed by individual providers already), and changes the test init method from `installContentFileSystem` to `initialize` to more closely match app code. * Fix license header * Add "getParent" implementation Adds generic & ExternalStorageProvider specific implementations for "ContentPath#getParent()", along with host side tests. It would be nice to have instrumentation tests, but I haven't been able to grant access to any ExternalStorageProvider APIs in a test. I could implement it for TestDocumentProvider but that would also require a bit more work. * Apply Spotless Test: Existing tests pass * Add copyright header * Add POM details for filesystem * Enable KDOC generation & publication on MavenCentral of filesystem Add API metadata Unify build.gradle for both libraries * Filesystem (#30) * Import proof-of-concept ContentFileSystemProvider A proof-of-concept java.nio.file.spi.FileSystemProvider implementation for working with `content://` scheme URIs. The very basic implementation supports use of `Files.walk()` and the `Path` objects returned can be passed directly to `okio` methods. The implementation includes a token set of tests due to the way content:// uri access is usually granted (via the system file picker). Currently working on how to write more useful cases. * Sample scaffolding Adds scaffolding for a demo of the filesystem library. * Minor update for ExternalStoragePath Delegate the `isTree` method to `ContentPath`. * Add test case for single document Adds a pair of test cases for a single document Path. Creating a Uri that's used with DocumentsContract to connect to a test DocumentProvider and return content. * Add check for "root" Add a check for a Root.MIME_TYPE_ITEM for deciding if a document is a directory or not. * Improve test cases - Builds a DocumentsProvider for testing the filesystem code with ContentResolver. - Built a small DSL to allow creating a document tree for test cases that doesn't rely on creating files. * Add basic test for Files.walk Builds up the TestDocumentProvider to support operations needed for walking a tree. * Extract Android classes This changes the implementation to extract all the Android specific calls from the main FileSystem classes so that we'll be able to write host side unit tests that run without Android/Robolectric. NOTE: Technically there are a couple of methods left, but they're more difficult to extract in a clean way at the moment, so I've left them. In ExternalStoragePath: - android.os.Environment#getExternalStorageDirectory() - android.os.Process#myPid() * Host side tests First set of host side tests for ContentFileSystemProvider et al. * Update copyright Switch copyright from AOSP to Google LLC (to match the rest of ModernStorage). * Remove debug log statements * Register FileSystem "roots" Register URIs when an instance of a ContentFileSystem is created, and allow retrieving them with `ContentFileSystem.getRootDirectories()` * Minor update to test code * Refactoring Refactors some of the provider specific methods to the FileSystem level (which are backed by individual providers already), and changes the test init method from `installContentFileSystem` to `initialize` to more closely match app code. * Fix license header * Add "getParent" implementation Adds generic & ExternalStorageProvider specific implementations for "ContentPath#getParent()", along with host side tests. It would be nice to have instrumentation tests, but I haven't been able to grant access to any ExternalStorageProvider APIs in a test. I could implement it for TestDocumentProvider but that would also require a bit more work. * Apply Spotless Test: Existing tests pass * Address PR comments. * Add some .idea files to the repo (#38) This adds a few files from the .idea directory to the repo, based on the .gitignore (and some settings) from AndroidX. * Upgrade AGP to 4.2.2 * Upgrade sample dependencies * Add filesystem demo * Revert sample minSDK to API 21 Add minSDK check in demo list * Check Uri aren't null from activityResults before executing file content preview logic Use Files.readAllLines instead Files.newBufferedReader Add comments in DemoListAdapter.kt * Upgrade release number * Change edit URI (we're using the main branch, not master) * Add filesystem guide * Fix API docs output directory * Upgrade to Android Studio Arctic Fox Upgrade dependencies * Fix bug when modifying _captureMediaIntent in MediaStoreViewModel.kt * Apply Spotless Co-authored-by: Nicole Borrelli <borrelli@google.com>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a few files from the .idea directory to the repo, based on the
.gitignore (and some settings) from AndroidX.