-
Notifications
You must be signed in to change notification settings - Fork 7
Comparing changes
Open a pull request
base repository: chenxiaolong/RSAF
base: v2.4
head repository: chenxiaolong/RSAF
compare: master
Commits on Dec 20, 2024
-
Add support for DocumentsProvider.openDocumentThumbnail()
This will return a pipe and then spawn a background task to generate a thumbnail and write it to the pipe. Cancellation is supported in between logical operations (eg. parse headers, load frame, etc.). Android has no way to interrupt the parsers in MediaMetadataRetriever and ImageDecoder though, so there will be a delay before cancellation takes effect. This can be noticeable when scrolling quickly, for example through a list of videos, since there is a hard concurrency limit equal to the number of logical cores. Note that only audio, image, and video formats natively supported by Android can be thumbnailed. We don't bundle any decoders. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 1b41b95 - Browse repository at this point
Copy the full SHA 1b41b95View commit details -
CHANGELOG.md: Add entry for PR #113
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 3701006 - Browse repository at this point
Copy the full SHA 3701006View commit details -
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 38d4a94 - Browse repository at this point
Copy the full SHA 38d4a94View commit details
Commits on Jan 12, 2025
-
Add support for resuming VFS cache writeback
Previously, if the VFS cache writeback was interrupted, it would effectively not be resumable, especially if the files were big. After the interruption, the first file operation on remotes with pending uploads would block until the uploads completed. However, there would be no foreground service to keep the process alive. The only way to get out of the situation would be to leave the RSAF settings screen open until the uploads invisibly complete. With this commit, BackgroundUploadMonitorService is now also started on boot or when the user first opens the app after it crashes or is killed. It will scan through the VFS cache directory and initialize the VFS instances for remotes with pending uploads. The service now exits on its own after a period of time with no VFS cache files open. For this to work well, the rclone VFS is configured so that writebacks are asynchronous. This is necessary to prevent VFS initialization from blocking until uploads are complete, but unfortunately also makes the close() operation asynchronous. RSAF is no longer able to show a notification if a background upload fails. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for c63e7f4 - Browse repository at this point
Copy the full SHA c63e7f4View commit details -
CHANGELOG.md: Add entry for PR #114
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for c63d934 - Browse repository at this point
Copy the full SHA c63d934View commit details -
Remove support for POSIX-like semantics
This turned out to be not such a great idea. Applications expect document providers to behave like Android's builtin FileSystemProvider for local files. POSIX-like semantics differed significantly from that and there are no known applications that explicitly try to make use of this functionality. Let's get rid of this feature and simplify the code. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for d33e9ea - Browse repository at this point
Copy the full SHA d33e9eaView commit details -
CHANGELOG.md: Add entry for PR #115
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for ece4835 - Browse repository at this point
Copy the full SHA ece4835View commit details -
Fix broken golang dependency caching in Github Actions CI build
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for f97ca78 - Browse repository at this point
Copy the full SHA f97ca78View commit details -
CHANGELOG.md: Add entry for PR #116
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for b285043 - Browse repository at this point
Copy the full SHA b285043View commit details -
Nothing special this time besides the addition of the `vfs.ELOOP` error code. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 276c95d - Browse repository at this point
Copy the full SHA 276c95dView commit details -
CHANGELOG.md: Add entry for PR #117
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for d439b7a - Browse repository at this point
Copy the full SHA d439b7aView commit details
Commits on Jan 13, 2025
-
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 8d0e36c - Browse repository at this point
Copy the full SHA 8d0e36cView commit details -
CHANGELOG.md: Add entry for PR #118
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 66281a9 - Browse repository at this point
Copy the full SHA 66281a9View commit details -
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for e91b8ea - Browse repository at this point
Copy the full SHA e91b8eaView commit details
Commits on Jan 14, 2025
-
Add proper support for Android's CA trust stores
golang does not support Android's various trust stores well. The CA certificates in /system/etc/security/cacerts are the only ones that are properly read. The updatable apex trust store in Android 14+ and the user trust store are ignored. System CA certificates that the user disables are still permitted to be used. This commit implements our own certificate loading mechanism that loads from all of Android's trust stores and respects disabled certificates. We generate a combined PEM file in a temp file and feed that to rclone's CaCert option. While live reloading is supported, the user experience is not that great. Due to rclone's caching, when certificates are reloaded, they only take effect in new remotes. The user will need to delete and recreate the remote, export and reimport, or force close RSAF. Fixes: #119 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for bff18e6 - Browse repository at this point
Copy the full SHA bff18e6View commit details -
CHANGELOG.md: Add entry for PR #120
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 6c88320 - Browse repository at this point
Copy the full SHA 6c88320View commit details -
Make file close operations synchronous again
In c63e7f4, file close operations were made asynchronous to prevent vfs.New() from blocking due to it opening and closing every cached file to trigger pending uploads. This broke the in-use file tracker in RcloneProvider and made it impossible for RSAF to report upload errors in most cases. This commit fixes the problem by keeping the file close operation asynchronous initially and then making it synchronous after the VFS instance is created. Fixes: #81 (again) Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 4c97113 - Browse repository at this point
Copy the full SHA 4c97113View commit details -
CHANGELOG.md: Add entry for PR #121
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for e3d3897 - Browse repository at this point
Copy the full SHA e3d3897View commit details
Commits on Jan 15, 2025
-
Prompt before actions that delete the VFS cache
Previously, when deleting a remote, renaming (copy + delete) a remote, or importing a configuration, we'd wait up to 1 minute for pending VFS writeback operations to complete and then delete the remote and VFS cache. This was a terrible user experience because: * the user does not have the choice to wait for file operations to complete if they weren't already aware of them * the UI would appear as if nothing was happening * the user would have to wait for no reason if they don't care about pending uploads With this commit, we'll show a prompt before destructive operations that delete the VFS cache. If the user chooses to proceed, the deletion occurs immediately. This is not perfect though--a VFS writeback thread cannot be cancelled and will likely throw a checksum validation error when it completes. Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for ac029e8 - Browse repository at this point
Copy the full SHA ac029e8View commit details -
CHANGELOG.md: Add entry for PR #123
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 46c8cd4 - Browse repository at this point
Copy the full SHA 46c8cd4View commit details
Commits on Jan 16, 2025
-
Add support for automatically reloading CA certificates
The initial implementation of loading Android's CA trust stores wrote the certificates to a temporary file and then passed them to rclone via the CaCert config option. This would only get loaded when a new backend Fs instance was created. If the backend was already created, the user would need to delete and recreate the remote or force quit RSAF, which is a terrible user experience. Unfortunately, reloading by recreating the Fs and VFS instances would not provide a good experience either. The VFS would need to be shut down, interrupting VFS writeback, and we need to wait for the garbage collector to clean up the VFS instance so that the corresponding Fs instance would be unpinned from the cache. This precludes the CA reloading process from being automatic. Instead, this commit makes use of a per-request hook to set the trusted CA certificates on every connection. This requires a soft-fork of rclone to add a hook point to fshttp.(*Transport).RoundTrip(). The patch is extremely simple and is easy to port to future versions of rclone. No other patches will be added to the fork and I plan to switch back to the upstream version if another good solution is found, even if hacky. Some other approaches I tried or considered: * Replace fshttp.isCertificateExpired() using go:linkname and in the replacement, update the tls.Config.RootCAs in addition to executing a copy of the original code. This function would be called during each RoundTrip() invocation. This approach does not work with how gomobile builds rcbridge as a library and causes duplicate symbol errors during linking. * Add the code as is done in this commit, except via a -toolexec program that preprocesses the AST of the go sources. This approach does not work because -toolexec is not invoked at the necessary points when compiling with gomobile. * Patch fshttp.isCertificateExpired() at runtime by inserting a jump call to our own implementation. This is error prone, requires specific assembly code for each CPU architecture, and does not work if the function we want to patch was inlined. This commit also fixes a bug where a remote's Fs instance is not properly removed from rclone's cache when deleting the remote. Issue: #119 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 7b4b5f6 - Browse repository at this point
Copy the full SHA 7b4b5f6View commit details -
CHANGELOG.md: Add entry for PR #125
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 6233904 - Browse repository at this point
Copy the full SHA 6233904View commit details
Commits on Jan 18, 2025
-
Only allow copy/move via rclone when it can be done server-side
If copyDocument() and moveDocument() are slow, the binder transaction will time out and Android will kill RSAF. If we can't perform the operation quickly via server-side operations, let's just tell the client that the operation is unsupported. Android's DocumentsUI specifically handles this scenario and will do the copy/move operation itself, which isn't subject to this problem. Fixes: #124 Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 21b3251 - Browse repository at this point
Copy the full SHA 21b3251View commit details -
CHANGELOG.md: Add entry for PR #126
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 9556d2c - Browse repository at this point
Copy the full SHA 9556d2cView commit details -
Improve logic for revoking grants when moving and removing documents
The DocumentsProvider base class already has a method for doing this. The previous revokeGrants() method did not properly revoke grants for tree URIs. This also fixes grants being revoked twice when a client app calls deleteDocument(). Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for b21d1b7 - Browse repository at this point
Copy the full SHA b21d1b7View commit details -
CHANGELOG.md: Add entry for PR #129
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for b67e1ae - Browse repository at this point
Copy the full SHA b67e1aeView commit details -
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Configuration menu - View commit details
-
Copy full SHA for 02c922e - Browse repository at this point
Copy the full SHA 02c922eView commit details
There are no files selected for viewing