From 02719ada963e208a385a6153ca721911ed62b147 Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Tue, 4 Apr 2023 15:53:19 +0200 Subject: [PATCH 1/4] create setup & ui package and move classes related to that --- app/src/main/AndroidManifest.xml | 6 ++--- .../AccountRemoveCallbackReceiver.java | 2 +- .../receivers/BootCompletedReceiver.java | 2 +- .../e/drive/services/ObserverService.java | 1 + .../InitializerService.java | 3 +-- .../RootSyncedFolderProvider.kt | 3 ++- .../worker}/CreateRemoteFolderWorker.java | 2 +- .../worker}/FirstStartWorker.java | 5 ++++- .../{ => ui}/activity/AccountsActivity.java | 10 ++++----- .../ApplicationGlideModule.java | 2 +- .../drive/{ => ui}/widgets/EDriveWidget.java | 2 +- .../e/drive/work/AccountUserInfoWorker.java | 4 ++-- .../e/drive/work/WorkRequestFactory.java | 22 ++++++++++--------- .../services/InitializerServiceTest.java | 3 +-- .../e/drive/services/ObserverServiceTest.java | 3 +-- 15 files changed, 37 insertions(+), 33 deletions(-) rename app/src/main/java/foundation/e/drive/{services => setup}/InitializerService.java (97%) rename app/src/main/java/foundation/e/drive/{utils => setup}/RootSyncedFolderProvider.kt (98%) rename app/src/main/java/foundation/e/drive/{work => setup/worker}/CreateRemoteFolderWorker.java (99%) rename app/src/main/java/foundation/e/drive/{work => setup/worker}/FirstStartWorker.java (94%) rename app/src/main/java/foundation/e/drive/{ => ui}/activity/AccountsActivity.java (95%) rename app/src/main/java/foundation/e/drive/{ => ui}/configurations/ApplicationGlideModule.java (96%) rename app/src/main/java/foundation/e/drive/{ => ui}/widgets/EDriveWidget.java (99%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 22dabee0..bc566d76 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -34,14 +34,14 @@ android:roundIcon="@drawable/ic_murena_eel" android:requestLegacyExternalStorage="true"> @@ -77,7 +77,7 @@ diff --git a/app/src/main/java/foundation/e/drive/receivers/AccountRemoveCallbackReceiver.java b/app/src/main/java/foundation/e/drive/receivers/AccountRemoveCallbackReceiver.java index 6a95cef6..f2d23932 100644 --- a/app/src/main/java/foundation/e/drive/receivers/AccountRemoveCallbackReceiver.java +++ b/app/src/main/java/foundation/e/drive/receivers/AccountRemoveCallbackReceiver.java @@ -25,7 +25,7 @@ import java.io.File; import foundation.e.drive.EdriveApplication; import foundation.e.drive.database.DbHelper; import foundation.e.drive.database.FailedSyncPrefsManager; -import foundation.e.drive.services.InitializerService; +import foundation.e.drive.setup.InitializerService; import foundation.e.drive.services.ObserverService; import foundation.e.drive.services.SynchronizationService; import foundation.e.drive.utils.AppConstants; diff --git a/app/src/main/java/foundation/e/drive/receivers/BootCompletedReceiver.java b/app/src/main/java/foundation/e/drive/receivers/BootCompletedReceiver.java index 094cfeef..724caf42 100644 --- a/app/src/main/java/foundation/e/drive/receivers/BootCompletedReceiver.java +++ b/app/src/main/java/foundation/e/drive/receivers/BootCompletedReceiver.java @@ -16,7 +16,7 @@ import android.database.sqlite.SQLiteException; import foundation.e.drive.BuildConfig; import foundation.e.drive.database.DbHelper; -import foundation.e.drive.services.InitializerService; +import foundation.e.drive.setup.InitializerService; import foundation.e.drive.utils.AppConstants; import foundation.e.drive.utils.CommonUtils; import timber.log.Timber; diff --git a/app/src/main/java/foundation/e/drive/services/ObserverService.java b/app/src/main/java/foundation/e/drive/services/ObserverService.java index a9b76105..e9bbe0b5 100644 --- a/app/src/main/java/foundation/e/drive/services/ObserverService.java +++ b/app/src/main/java/foundation/e/drive/services/ObserverService.java @@ -46,6 +46,7 @@ import foundation.e.drive.models.SyncedFileState; import foundation.e.drive.models.SyncedFolder; import foundation.e.drive.operations.ListFileRemoteOperation; import foundation.e.drive.receivers.DebugCmdReceiver; +import foundation.e.drive.setup.InitializerService; import foundation.e.drive.utils.AppConstants; import foundation.e.drive.utils.CommonUtils; import foundation.e.drive.utils.DavClientProvider; diff --git a/app/src/main/java/foundation/e/drive/services/InitializerService.java b/app/src/main/java/foundation/e/drive/setup/InitializerService.java similarity index 97% rename from app/src/main/java/foundation/e/drive/services/InitializerService.java rename to app/src/main/java/foundation/e/drive/setup/InitializerService.java index c6438174..a302662d 100644 --- a/app/src/main/java/foundation/e/drive/services/InitializerService.java +++ b/app/src/main/java/foundation/e/drive/setup/InitializerService.java @@ -7,7 +7,7 @@ * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.services; +package foundation.e.drive.setup; import android.accounts.Account; import android.accounts.AccountManager; @@ -23,7 +23,6 @@ import java.util.List; import foundation.e.drive.models.SyncedFolder; import foundation.e.drive.utils.AppConstants; import foundation.e.drive.utils.CommonUtils; -import foundation.e.drive.utils.RootSyncedFolderProvider; import timber.log.Timber; import androidx.annotation.NonNull; diff --git a/app/src/main/java/foundation/e/drive/utils/RootSyncedFolderProvider.kt b/app/src/main/java/foundation/e/drive/setup/RootSyncedFolderProvider.kt similarity index 98% rename from app/src/main/java/foundation/e/drive/utils/RootSyncedFolderProvider.kt rename to app/src/main/java/foundation/e/drive/setup/RootSyncedFolderProvider.kt index 2c3d46b9..7989b429 100644 --- a/app/src/main/java/foundation/e/drive/utils/RootSyncedFolderProvider.kt +++ b/app/src/main/java/foundation/e/drive/setup/RootSyncedFolderProvider.kt @@ -5,7 +5,7 @@ * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.utils +package foundation.e.drive.setup import android.content.Context import android.os.Build @@ -21,6 +21,7 @@ import android.os.Environment.DIRECTORY_RINGTONES import android.os.Environment.DIRECTORY_MOVIES import com.owncloud.android.lib.resources.files.FileUtils.PATH_SEPARATOR import foundation.e.drive.models.SyncedFolder +import foundation.e.drive.utils.CommonUtils object RootSyncedFolderProvider { private const val CATEGORY_IMAGES = "Images" diff --git a/app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java b/app/src/main/java/foundation/e/drive/setup/worker/CreateRemoteFolderWorker.java similarity index 99% rename from app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java rename to app/src/main/java/foundation/e/drive/setup/worker/CreateRemoteFolderWorker.java index e112c0f3..71360d6e 100644 --- a/app/src/main/java/foundation/e/drive/work/CreateRemoteFolderWorker.java +++ b/app/src/main/java/foundation/e/drive/setup/worker/CreateRemoteFolderWorker.java @@ -6,7 +6,7 @@ * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.work; +package foundation.e.drive.setup.worker; import android.accounts.Account; import android.accounts.AccountManager; diff --git a/app/src/main/java/foundation/e/drive/work/FirstStartWorker.java b/app/src/main/java/foundation/e/drive/setup/worker/FirstStartWorker.java similarity index 94% rename from app/src/main/java/foundation/e/drive/work/FirstStartWorker.java rename to app/src/main/java/foundation/e/drive/setup/worker/FirstStartWorker.java index 5890e103..8d501a6d 100644 --- a/app/src/main/java/foundation/e/drive/work/FirstStartWorker.java +++ b/app/src/main/java/foundation/e/drive/setup/worker/FirstStartWorker.java @@ -6,7 +6,7 @@ * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.work; +package foundation.e.drive.setup.worker; import static foundation.e.drive.utils.AppConstants.INITIALFOLDERS_NUMBER; import static foundation.e.drive.work.WorkRequestFactory.WorkType.ONE_TIME_APP_LIST; @@ -24,6 +24,9 @@ import androidx.work.WorkerParameters; import foundation.e.drive.EdriveApplication; import foundation.e.drive.utils.AppConstants; +import foundation.e.drive.work.PeriodicWorker; +import foundation.e.drive.work.RecycleBinCleaningWorker; +import foundation.e.drive.work.WorkRequestFactory; import timber.log.Timber; /** diff --git a/app/src/main/java/foundation/e/drive/activity/AccountsActivity.java b/app/src/main/java/foundation/e/drive/ui/activity/AccountsActivity.java similarity index 95% rename from app/src/main/java/foundation/e/drive/activity/AccountsActivity.java rename to app/src/main/java/foundation/e/drive/ui/activity/AccountsActivity.java index 47c45896..4d723081 100644 --- a/app/src/main/java/foundation/e/drive/activity/AccountsActivity.java +++ b/app/src/main/java/foundation/e/drive/ui/activity/AccountsActivity.java @@ -6,16 +6,16 @@ * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.activity; +package foundation.e.drive.ui.activity; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_ALIAS_KEY; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_EMAIL; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_NAME; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_TOTAL_QUOTA_KEY; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_USED_QUOTA_KEY; -import static foundation.e.drive.widgets.EDriveWidget.buildIntent; -import static foundation.e.drive.widgets.EDriveWidget.convertIntoMB; -import static foundation.e.drive.widgets.EDriveWidget.dataForWeb; +import static foundation.e.drive.ui.widgets.EDriveWidget.buildIntent; +import static foundation.e.drive.ui.widgets.EDriveWidget.convertIntoMB; +import static foundation.e.drive.ui.widgets.EDriveWidget.dataForWeb; import android.accounts.Account; import android.accounts.AccountManager; @@ -36,7 +36,7 @@ import foundation.e.drive.databinding.ActivityAccountsBinding; import foundation.e.drive.utils.AccountUtils; import foundation.e.drive.utils.CommonUtils; import foundation.e.drive.utils.DavClientProvider; -import foundation.e.drive.widgets.EDriveWidget; +import foundation.e.drive.ui.widgets.EDriveWidget; import timber.log.Timber; public class AccountsActivity extends AppCompatActivity { diff --git a/app/src/main/java/foundation/e/drive/configurations/ApplicationGlideModule.java b/app/src/main/java/foundation/e/drive/ui/configurations/ApplicationGlideModule.java similarity index 96% rename from app/src/main/java/foundation/e/drive/configurations/ApplicationGlideModule.java rename to app/src/main/java/foundation/e/drive/ui/configurations/ApplicationGlideModule.java index 15f6dac8..95d6f821 100644 --- a/app/src/main/java/foundation/e/drive/configurations/ApplicationGlideModule.java +++ b/app/src/main/java/foundation/e/drive/ui/configurations/ApplicationGlideModule.java @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -package foundation.e.drive.configurations; +package foundation.e.drive.ui.configurations; import android.content.Context; import android.util.Log; diff --git a/app/src/main/java/foundation/e/drive/widgets/EDriveWidget.java b/app/src/main/java/foundation/e/drive/ui/widgets/EDriveWidget.java similarity index 99% rename from app/src/main/java/foundation/e/drive/widgets/EDriveWidget.java rename to app/src/main/java/foundation/e/drive/ui/widgets/EDriveWidget.java index a9b88e7d..675e701b 100644 --- a/app/src/main/java/foundation/e/drive/widgets/EDriveWidget.java +++ b/app/src/main/java/foundation/e/drive/ui/widgets/EDriveWidget.java @@ -6,7 +6,7 @@ * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.widgets; +package foundation.e.drive.ui.widgets; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_ALIAS_KEY; import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_EMAIL; diff --git a/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java b/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java index 2326515f..7772f799 100644 --- a/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java +++ b/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java @@ -41,12 +41,12 @@ import com.owncloud.android.lib.resources.users.GetUserInfoRemoteOperation; import java.util.ArrayList; import foundation.e.drive.R; -import foundation.e.drive.activity.AccountsActivity; +import foundation.e.drive.ui.activity.AccountsActivity; import foundation.e.drive.operations.GetAliasOperation; import foundation.e.drive.utils.AppConstants; import foundation.e.drive.utils.CommonUtils; import foundation.e.drive.utils.DavClientProvider; -import foundation.e.drive.widgets.EDriveWidget; +import foundation.e.drive.ui.widgets.EDriveWidget; import timber.log.Timber; /** diff --git a/app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java b/app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java index 3b6a0892..f17c7272 100644 --- a/app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java +++ b/app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java @@ -8,16 +8,16 @@ package foundation.e.drive.work; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_ENABLE; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_ID; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_LAST_ETAG; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_LAST_MODIFIED; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_LIBELLE; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_LOCAL_PATH; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_MEDIATYPE; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_REMOTE_PATH; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_SCAN_LOCAL; -import static foundation.e.drive.work.CreateRemoteFolderWorker.DATA_KEY_SCAN_REMOTE; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_ENABLE; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_ID; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_LAST_ETAG; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_LAST_MODIFIED; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_LIBELLE; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_LOCAL_PATH; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_MEDIATYPE; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_REMOTE_PATH; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_SCAN_LOCAL; +import static foundation.e.drive.setup.worker.CreateRemoteFolderWorker.DATA_KEY_SCAN_REMOTE; import androidx.annotation.NonNull; import androidx.annotation.Nullable; @@ -32,6 +32,8 @@ import java.security.InvalidParameterException; import java.util.concurrent.TimeUnit; import foundation.e.drive.models.SyncedFolder; +import foundation.e.drive.setup.worker.CreateRemoteFolderWorker; +import foundation.e.drive.setup.worker.FirstStartWorker; import foundation.e.drive.utils.AppConstants; public class WorkRequestFactory { diff --git a/app/src/test/java/foundation/e/drive/services/InitializerServiceTest.java b/app/src/test/java/foundation/e/drive/services/InitializerServiceTest.java index 725d8bd8..6963501f 100644 --- a/app/src/test/java/foundation/e/drive/services/InitializerServiceTest.java +++ b/app/src/test/java/foundation/e/drive/services/InitializerServiceTest.java @@ -10,15 +10,14 @@ import android.net.ConnectivityManager; import androidx.test.core.app.ApplicationProvider; -import androidx.work.WorkManager; import org.junit.Test; import org.robolectric.Robolectric; -import org.robolectric.RuntimeEnvironment; import org.robolectric.shadows.ShadowLog; import foundation.e.drive.TestUtils; import foundation.e.drive.database.DbHelper; +import foundation.e.drive.setup.InitializerService; import foundation.e.drive.utils.AppConstants; public class InitializerServiceTest extends AbstractServiceIT{ diff --git a/app/src/test/java/foundation/e/drive/services/ObserverServiceTest.java b/app/src/test/java/foundation/e/drive/services/ObserverServiceTest.java index 2a25755e..20820c77 100644 --- a/app/src/test/java/foundation/e/drive/services/ObserverServiceTest.java +++ b/app/src/test/java/foundation/e/drive/services/ObserverServiceTest.java @@ -7,7 +7,6 @@ import android.content.Intent; import android.net.ConnectivityManager; import android.net.NetworkInfo; -import com.nextcloud.common.NextcloudClient; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.resources.files.CreateFolderRemoteOperation; @@ -20,12 +19,12 @@ import org.robolectric.shadows.ShadowLog; import org.robolectric.shadows.ShadowNetworkInfo; import java.io.File; -import android.net.Uri; import java.util.List; import foundation.e.drive.TestUtils; import foundation.e.drive.database.DbHelper; import foundation.e.drive.models.SyncedFolder; +import foundation.e.drive.setup.InitializerService; import foundation.e.drive.utils.AppConstants; import foundation.e.drive.utils.CommonUtils; -- GitLab From 6592b99be6c84e35e19659492d1adee291a9ef69 Mon Sep 17 00:00:00 2001 From: vincent Bourgmayer Date: Tue, 4 Apr 2023 16:00:48 +0200 Subject: [PATCH 2/4] create detections package for component related to file's change detection --- app/src/main/AndroidManifest.xml | 2 +- .../java/foundation/e/drive/EdriveApplication.java | 4 ++-- .../drive/{utils => detections}/FileDiffUtils.java | 2 +- .../FileObservers/FileEventListener.java | 4 +--- .../FileObservers/RecursiveFileObserver.java | 2 +- .../ListFileRemoteOperation.java | 11 +++-------- .../{services => detections}/ObserverService.java | 13 ++++++------- .../contentScanners}/AbstractContentScanner.java | 2 +- .../contentScanners}/FolderWrapper.java | 2 +- .../contentScanners}/LocalContentScanner.java | 4 ++-- .../contentScanners}/RemoteContentScanner.java | 6 +++--- .../fileFilters/AppSettingsFileFilter.java | 2 +- .../fileFilters/CrashlogsFileFilter.java | 2 +- .../fileFilters/FileFilterFactory.java | 2 +- .../fileFilters/MediaFileFilter.java | 2 +- .../fileFilters/NoCacheFileFilter.java | 2 +- .../fileFilters/OnlyFileFilter.java | 2 +- .../fileFilters/SettingsFileFilter.java | 2 +- .../listers}/AbstractFileLister.java | 3 ++- .../listers}/LocalFileLister.java | 5 +++-- .../listers}/RemoteFileLister.java | 3 ++- .../workers}/FullScanWorker.java | 4 ++-- .../workers}/ListAppsWorker.java | 2 +- .../workers}/PeriodicWorker.java | 4 +++- .../receivers/AccountRemoveCallbackReceiver.java | 2 +- .../e/drive/receivers/DebugCmdReceiver.java | 3 +-- .../e/drive/setup/worker/FirstStartWorker.java | 5 +++-- .../foundation/e/drive/work/WorkRequestFactory.java | 3 +++ .../contentScanner/LocalContentScannerTest.java | 1 + .../e/drive/contentScanner/LocalFileListerTest.java | 2 ++ .../contentScanner/RemoteContentScannerTest.java | 1 + .../drive/contentScanner/RemoteFileListerTest.java | 1 + .../e/drive/services/ObserverServiceTest.java | 1 + 33 files changed, 56 insertions(+), 50 deletions(-) rename app/src/main/java/foundation/e/drive/{utils => detections}/FileDiffUtils.java (98%) rename app/src/main/java/foundation/e/drive/{ => detections}/FileObservers/FileEventListener.java (98%) rename app/src/main/java/foundation/e/drive/{ => detections}/FileObservers/RecursiveFileObserver.java (98%) rename app/src/main/java/foundation/e/drive/{operations => detections}/ListFileRemoteOperation.java (88%) rename app/src/main/java/foundation/e/drive/{services => detections}/ObserverService.java (97%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/contentScanners}/AbstractContentScanner.java (98%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/contentScanners}/FolderWrapper.java (97%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/contentScanners}/LocalContentScanner.java (96%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/contentScanners}/RemoteContentScanner.java (95%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/AppSettingsFileFilter.java (93%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/CrashlogsFileFilter.java (97%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/FileFilterFactory.java (95%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/MediaFileFilter.java (92%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/NoCacheFileFilter.java (91%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/OnlyFileFilter.java (91%) rename app/src/main/java/foundation/e/drive/{ => detections}/fileFilters/SettingsFileFilter.java (95%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/listers}/AbstractFileLister.java (98%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/listers}/LocalFileLister.java (95%) rename app/src/main/java/foundation/e/drive/{contentScanner => detections/listers}/RemoteFileLister.java (97%) rename app/src/main/java/foundation/e/drive/{work => detections/workers}/FullScanWorker.java (95%) rename app/src/main/java/foundation/e/drive/{work => detections/workers}/ListAppsWorker.java (98%) rename app/src/main/java/foundation/e/drive/{work => detections/workers}/PeriodicWorker.java (94%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bc566d76..5d1f39a1 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -85,7 +85,7 @@ Date: Tue, 4 Apr 2023 16:11:42 +0200 Subject: [PATCH 3/4] add synchronizations package for stuff related to file synchronization: upload, download, etc. also move some other classes into other packages: - receivers package has been moved into ui package because it's related to sync settings --- app/src/main/AndroidManifest.xml | 14 +++++++------- .../java/foundation/e/drive/EdriveApplication.java | 4 ++-- .../FileObservers/FileEventListener.java | 2 +- .../e/drive/detections/ObserverService.java | 4 ++-- .../fileFilters/CrashlogsFileFilter.java | 2 +- .../e/drive/detections/workers/PeriodicWorker.java | 6 +++--- .../foundation/e/drive/models/SyncWrapper.java | 6 +++--- .../receivers/AccountRemoveCallbackReceiver.java | 2 +- .../e/drive/receivers/DebugCmdReceiver.java | 2 +- .../e/drive/setup/worker/FirstStartWorker.java | 13 +++++++------ .../LocalFileDeleter.java | 2 +- .../SynchronizationService.java | 11 +++++------ .../SynchronizationServiceConnection.java | 3 +-- .../operations/DownloadFileOperation.java | 2 +- .../operations/GetAliasOperation.java | 2 +- .../operations/RemoveFileOperation.java | 2 +- .../operations/UploadFileOperation.java | 2 +- .../{ => ui}/providers/MediasSyncProvider.java | 2 +- .../MeteredConnectionAllowedProvider.java | 2 +- .../{ => ui}/providers/SettingsSyncProvider.java | 2 +- .../java/foundation/e/drive/utils/CommonUtils.java | 5 +++-- .../e/drive/utils/{ => logs}/ReleaseTree.java | 2 +- .../utils/{ => logs}/ServiceExceptionHandler.java | 2 +- .../{work => workers}/AccountUserInfoWorker.java | 4 ++-- .../{work => workers}/RecycleBinCleaningWorker.kt | 2 +- .../{work => workers}/WorkRequestFactory.java | 2 +- .../drive/operations/UploadFileOperationTest.java | 2 +- .../e/drive/services/ObserverServiceTest.java | 1 + 28 files changed, 53 insertions(+), 52 deletions(-) rename app/src/main/java/foundation/e/drive/{work => synchronizations}/LocalFileDeleter.java (97%) rename app/src/main/java/foundation/e/drive/{services => synchronizations}/SynchronizationService.java (97%) rename app/src/main/java/foundation/e/drive/{utils => synchronizations}/SynchronizationServiceConnection.java (96%) rename app/src/main/java/foundation/e/drive/{ => synchronizations}/operations/DownloadFileOperation.java (99%) rename app/src/main/java/foundation/e/drive/{ => synchronizations}/operations/GetAliasOperation.java (98%) rename app/src/main/java/foundation/e/drive/{ => synchronizations}/operations/RemoveFileOperation.java (94%) rename app/src/main/java/foundation/e/drive/{ => synchronizations}/operations/UploadFileOperation.java (99%) rename app/src/main/java/foundation/e/drive/{ => ui}/providers/MediasSyncProvider.java (97%) rename app/src/main/java/foundation/e/drive/{ => ui}/providers/MeteredConnectionAllowedProvider.java (97%) rename app/src/main/java/foundation/e/drive/{ => ui}/providers/SettingsSyncProvider.java (97%) rename app/src/main/java/foundation/e/drive/utils/{ => logs}/ReleaseTree.java (95%) rename app/src/main/java/foundation/e/drive/utils/{ => logs}/ServiceExceptionHandler.java (98%) rename app/src/main/java/foundation/e/drive/{work => workers}/AccountUserInfoWorker.java (98%) rename app/src/main/java/foundation/e/drive/{work => workers}/RecycleBinCleaningWorker.kt (96%) rename app/src/main/java/foundation/e/drive/{work => workers}/WorkRequestFactory.java (99%) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 5d1f39a1..b2834ea4 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -57,20 +57,20 @@ @@ -87,7 +87,7 @@ - + Date: Tue, 4 Apr 2023 16:37:36 +0200 Subject: [PATCH 4/4] fix build error --- .../e/drive/detections/listers/AbstractFileLister.java | 1 - .../detections/{contentScanners => listers}/FolderWrapper.java | 2 +- .../foundation/e/drive/detections/listers/LocalFileLister.java | 1 - .../foundation/e/drive/detections/listers/RemoteFileLister.java | 1 - .../foundation/e/drive/contentScanner/LocalFileListerTest.java | 2 +- 5 files changed, 2 insertions(+), 5 deletions(-) rename app/src/main/java/foundation/e/drive/detections/{contentScanners => listers}/FolderWrapper.java (97%) diff --git a/app/src/main/java/foundation/e/drive/detections/listers/AbstractFileLister.java b/app/src/main/java/foundation/e/drive/detections/listers/AbstractFileLister.java index 7e1f1638..44876428 100644 --- a/app/src/main/java/foundation/e/drive/detections/listers/AbstractFileLister.java +++ b/app/src/main/java/foundation/e/drive/detections/listers/AbstractFileLister.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.ListIterator; import foundation.e.drive.database.DbHelper; -import foundation.e.drive.detections.contentScanners.FolderWrapper; import foundation.e.drive.models.SyncedFolder; import timber.log.Timber; diff --git a/app/src/main/java/foundation/e/drive/detections/contentScanners/FolderWrapper.java b/app/src/main/java/foundation/e/drive/detections/listers/FolderWrapper.java similarity index 97% rename from app/src/main/java/foundation/e/drive/detections/contentScanners/FolderWrapper.java rename to app/src/main/java/foundation/e/drive/detections/listers/FolderWrapper.java index 7289ab56..ee2099fa 100644 --- a/app/src/main/java/foundation/e/drive/detections/contentScanners/FolderWrapper.java +++ b/app/src/main/java/foundation/e/drive/detections/listers/FolderWrapper.java @@ -5,7 +5,7 @@ * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/gpl.html */ -package foundation.e.drive.detections.contentScanners; +package foundation.e.drive.detections.listers; import androidx.annotation.NonNull; diff --git a/app/src/main/java/foundation/e/drive/detections/listers/LocalFileLister.java b/app/src/main/java/foundation/e/drive/detections/listers/LocalFileLister.java index e05ff131..edf73f7e 100644 --- a/app/src/main/java/foundation/e/drive/detections/listers/LocalFileLister.java +++ b/app/src/main/java/foundation/e/drive/detections/listers/LocalFileLister.java @@ -18,7 +18,6 @@ import java.util.Arrays; import java.util.List; import foundation.e.drive.database.DbHelper; -import foundation.e.drive.detections.contentScanners.FolderWrapper; import foundation.e.drive.detections.fileFilters.FileFilterFactory; import foundation.e.drive.models.SyncedFolder; import timber.log.Timber; diff --git a/app/src/main/java/foundation/e/drive/detections/listers/RemoteFileLister.java b/app/src/main/java/foundation/e/drive/detections/listers/RemoteFileLister.java index 87bc4879..1d582850 100644 --- a/app/src/main/java/foundation/e/drive/detections/listers/RemoteFileLister.java +++ b/app/src/main/java/foundation/e/drive/detections/listers/RemoteFileLister.java @@ -21,7 +21,6 @@ import java.util.ArrayList; import java.util.List; import foundation.e.drive.database.DbHelper; -import foundation.e.drive.detections.contentScanners.FolderWrapper; import foundation.e.drive.models.SyncedFolder; import foundation.e.drive.utils.CommonUtils; diff --git a/app/src/test/java/foundation/e/drive/contentScanner/LocalFileListerTest.java b/app/src/test/java/foundation/e/drive/contentScanner/LocalFileListerTest.java index d87720e7..55c71250 100644 --- a/app/src/test/java/foundation/e/drive/contentScanner/LocalFileListerTest.java +++ b/app/src/test/java/foundation/e/drive/contentScanner/LocalFileListerTest.java @@ -31,7 +31,7 @@ import java.util.List; import foundation.e.drive.TestUtils; import foundation.e.drive.database.DbHelper; -import foundation.e.drive.detections.contentScanners.FolderWrapper; +import foundation.e.drive.detections.listers.FolderWrapper; import foundation.e.drive.detections.listers.LocalFileLister; import foundation.e.drive.models.SyncedFileState; import foundation.e.drive.models.SyncedFolder; -- GitLab