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

Skip to content

Replace locale file deletion task, by file sync disabling task.

Vincent Bourgmayer requested to merge 1290-remove-local-deletion-feature into main

Description

eDrive, file deletion behaviour must be removed.

Screenshots

Remote deletion:

Before After
image image

Database, about a file after a remote deletion:

Local instant Deletion:

Before After
image image
logcat ``` 06-06 15:19:00.338 3194 5313 I ObserverService: There is no file to sync. 06-06 15:19:00.341 3194 3194 V ListFileRemoteOperation: onDestroy() 06-06 15:25:15.821 3194 3484 D FileEventListener: handleFileDelete( /storage/emulated/0/DCIM/OpenCamera/IMG_20230603_155556.jpg ) 06-06 15:25:15.828 3194 3484 D SyncedFileStateDAO: Sending a SyncRequest for IMG_20230603_155556.jpg 06-06 15:25:15.829 3194 3484 I SynchronizationService: startAllThreads 06-06 15:25:15.830 3194 3484 V CommonUtils: haveNetworkConnection() 06-06 15:25:15.831 3194 3484 V SynchronizationService: starts IMG_20230603_155556.jpg local deletion on thread 0 06-06 15:25:15.832 3194 3484 V CommonUtils: haveNetworkConnection() 06-06 15:25:15.832 3194 5981 D DbHelper: manageSyncedFileStateDB( IMG_20230603_155556.jpg, UPDATE ) 06-06 15:25:15.838 3194 3538 D SynchronizationService: /storage/emulated/0/DCIM/OpenCamera/IMG_20230603_155556.jpg sync disabled? true 06-06 15:25:15.839 3194 3538 V CommonUtils: haveNetworkConnection() ```
--- ***Local deletion by periodic job:***
Before After
image image
Logcat ``` 06-06 15:36:25.692 3129 5098 D LocalContentScanner: manageSyncedFileStateDB( packages_list.csv, INSERT ) 06-06 15:36:26.199 3129 5098 D SyncedFileStateDAO: Add remove SyncRequest for file /storage/emulated/0/DCIM/Readme.md 06-06 15:36:26.201 3129 5098 D LocalContentScanner: Expected /data/user/0/foundation.e.drive/files/packages_list.csv to be missing. but it still exists 06-06 15:36:26.202 3129 5098 D ObserverService: syncRequests contains 1 06-06 15:36:26.204 3129 5098 I SynchronizationService: startAllThreads 06-06 15:36:26.206 3129 5098 V CommonUtils: haveNetworkConnection() 06-06 15:36:26.213 3129 5098 V SynchronizationService: starts Readme.md local deletion on thread 0 06-06 15:36:26.216 3129 5116 D DbHelper: manageSyncedFileStateDB( Readme.md, UPDATE ) 06-06 15:36:26.216 3129 5098 V CommonUtils: haveNetworkConnection() 06-06 15:36:26.221 3129 3129 V ListFileRemoteOperation: onDestroy() 06-06 15:36:26.229 3129 3455 D SynchronizationService: /storage/emulated/0/DCIM/Readme.md sync disabled? true 06-06 15:36:26.230 3129 3455 V CommonUtils: haveNetworkConnection() ```

Technical details

  • Transform Local file removal due to missing remote file into sync file disabling
  • Transform Remote file removal due to missing local file (or direct local deletion) into sync file disabling
  • Remove Recycle bin code
  • Remove Recyclebin cleaning code
  • remove recycle bin creation code

Tests

Issues

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

10 commandments of code reviews

👪 https://gitlab.e.foundation/internal/wiki/-/wikis/development/code-review

Edited by Vincent Bourgmayer

Merge request reports

Loading