Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Draft: unpersisted eDrive: replace ObserverService by a Worker

Description

As a consequence of removing persistent flag, we have to replace backgroundService by other component such as Worker. This is a trial in order to have an idea of what is the impact, and time required for making it works.

In conclusion: without also changing the SynchronizationService it is not possible. It breaks all the architecture of the app.

Technical details

The idea was to replace ObserverService (responsible of periodic file change detection) by a Worker implementation. It looks good until I reach the point of passing list of SyncRequest to SynchronizationService. Because binding a worker to a service is complicated, and also because SynchronizationService won't work either, except if run as foreground services.

Other important point was running ListFileRemoteOperation as blocking for the worker thread instead of on a different thread, and using a onRemoteOperationFinish listener and a Handler.

Tests

Issues

https://gitlab.e.foundation/e/os/backlog/-/issues/1569

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/mobile-team/guidelines/Code-review

Merge request reports

Loading