-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: content observer work #15767
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
fix: content observer work #15767
Conversation
e4a33f1
to
c2796a5
Compare
Signed-off-by: alperozturk <alper_ozturk@proton.me>
Signed-off-by: alperozturk <alper_ozturk@proton.me>
c2796a5
to
e307143
Compare
<string name="notification_channel_offline_operations_name_short">Offline operations</string> | ||
<string name="notification_channel_offline_operations_description">Shows progress of offline file operations</string> | ||
|
||
<string name="content_observer_work_notification_title">Detecting content changes</string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The notification for ContentObserverWork
is only displayed when the user has enabled a folder for auto-upload, such as the DCIM directory and when the user takes a photo using the Camera app, the content observer worker will trigger and display the notification if any new files there. In practice, the notification will appear briefly.
Notification is mandatory to make ContentObserverWork
long-running task. ContentObserverWork
triggers to AutoUpload
thus it is needed to making it a long-running task ensures all triggers are executed.
Could you review the current wording for the notification title, channel name, and description?
Signed-off-by: alperozturk <alper_ozturk@proton.me>
test-Unit test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/15767-Unit-test-11-04 |
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15767.apk |
Fixes
ContentObserverWork
may fail due to the execution of other workers, such asbackgroundJobManager.startMediaFoldersDetectionJob()
. Such failures can prevent the auto upload of changed files from being triggered.Previously,
ContentObserverWork
ran as a regular background worker, which could be terminated by the system under rapid or heavy file changes, causing some uploads not to be triggered. Making it a long-running task ensures all triggers are reliably executed, and the OS is aware of this critical monitoring process.Demo
How to test?
Note
The notification will only be shown when new files are detected.