Replace locale file deletion task, by file sync disabling task.
Description
eDrive, file deletion behaviour must be removed.
Screenshots
Remote deletion:
Before | After |
---|---|
Database, about a file after a remote deletion:
Local instant Deletion:
Before | After |
---|---|
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() ```Before | After |
---|---|
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
- https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/182
- https://gitlab.e.foundation/e/os/eDrive/-/quality/test_cases/181
Issues
https://gitlab.e.foundation/e/os/backlog/-/issues/1290
10 commandments of code reviews
Edited by Vincent Bourgmayer