diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 22dabee08b53b0e563e8265460684282812416a1..b2834ea4c3aa1a7b783a1cb19fc56feaa81ba30c 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">
@@ -57,27 +57,27 @@
@@ -85,9 +85,9 @@
-
+
.
*/
-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/providers/MediasSyncProvider.java b/app/src/main/java/foundation/e/drive/ui/providers/MediasSyncProvider.java
similarity index 97%
rename from app/src/main/java/foundation/e/drive/providers/MediasSyncProvider.java
rename to app/src/main/java/foundation/e/drive/ui/providers/MediasSyncProvider.java
index 876b252a2085f4b906d3e0012cfc8fed3b64ec3f..961677ea50dcdad848f0142b777684b195bc27ee 100644
--- a/app/src/main/java/foundation/e/drive/providers/MediasSyncProvider.java
+++ b/app/src/main/java/foundation/e/drive/ui/providers/MediasSyncProvider.java
@@ -7,7 +7,7 @@
* http://www.gnu.org/licenses/gpl.html
*/
-package foundation.e.drive.providers;
+package foundation.e.drive.ui.providers;
import android.content.ContentProvider;
import android.content.ContentValues;
diff --git a/app/src/main/java/foundation/e/drive/providers/MeteredConnectionAllowedProvider.java b/app/src/main/java/foundation/e/drive/ui/providers/MeteredConnectionAllowedProvider.java
similarity index 97%
rename from app/src/main/java/foundation/e/drive/providers/MeteredConnectionAllowedProvider.java
rename to app/src/main/java/foundation/e/drive/ui/providers/MeteredConnectionAllowedProvider.java
index 1d119a2db4ef28cf6f14138da969d2d3a1eddc71..ca34a876ce4da9bde72b52e1bd6d06a20fdffc4a 100644
--- a/app/src/main/java/foundation/e/drive/providers/MeteredConnectionAllowedProvider.java
+++ b/app/src/main/java/foundation/e/drive/ui/providers/MeteredConnectionAllowedProvider.java
@@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
-package foundation.e.drive.providers;
+package foundation.e.drive.ui.providers;
import android.content.ContentProvider;
import android.content.ContentValues;
diff --git a/app/src/main/java/foundation/e/drive/providers/SettingsSyncProvider.java b/app/src/main/java/foundation/e/drive/ui/providers/SettingsSyncProvider.java
similarity index 97%
rename from app/src/main/java/foundation/e/drive/providers/SettingsSyncProvider.java
rename to app/src/main/java/foundation/e/drive/ui/providers/SettingsSyncProvider.java
index e35d204398f3ef25cae6bab190efe4d14e941374..993712f067175cf3e6b4a2834a8728888b1e5a71 100644
--- a/app/src/main/java/foundation/e/drive/providers/SettingsSyncProvider.java
+++ b/app/src/main/java/foundation/e/drive/ui/providers/SettingsSyncProvider.java
@@ -7,7 +7,7 @@
* http://www.gnu.org/licenses/gpl.html
*/
-package foundation.e.drive.providers;
+package foundation.e.drive.ui.providers;
import android.content.ContentProvider;
import android.content.ContentValues;
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 a9b88e7d1c5da098ed7073204a11154a4d49b94c..675e701be3a93c9f0c6cbf569c9d33537493723b 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/utils/CommonUtils.java b/app/src/main/java/foundation/e/drive/utils/CommonUtils.java
index 9a6ba862ad24e38c3afad6d106a2e28ef893caf6..fb38b2414c0168a2e6aafe71759691136901424d 100644
--- a/app/src/main/java/foundation/e/drive/utils/CommonUtils.java
+++ b/app/src/main/java/foundation/e/drive/utils/CommonUtils.java
@@ -40,9 +40,10 @@ import java.util.ArrayList;
import java.util.List;
import foundation.e.drive.R;
+import foundation.e.drive.utils.logs.ServiceExceptionHandler;
import foundation.e.drive.models.SyncedFolder;
-import foundation.e.drive.work.AccountUserInfoWorker;
-import foundation.e.drive.work.WorkRequestFactory;
+import foundation.e.drive.workers.AccountUserInfoWorker;
+import foundation.e.drive.workers.WorkRequestFactory;
import timber.log.Timber;
import static foundation.e.drive.utils.AppConstants.MEDIASYNC_PROVIDER_AUTHORITY;
diff --git a/app/src/main/java/foundation/e/drive/utils/ReleaseTree.java b/app/src/main/java/foundation/e/drive/utils/logs/ReleaseTree.java
similarity index 95%
rename from app/src/main/java/foundation/e/drive/utils/ReleaseTree.java
rename to app/src/main/java/foundation/e/drive/utils/logs/ReleaseTree.java
index 48e3385d04da198290355299a103e6fa30017222..5bbdb23787c513ec0fe28d9dfc8220a6b2c155a4 100644
--- a/app/src/main/java/foundation/e/drive/utils/ReleaseTree.java
+++ b/app/src/main/java/foundation/e/drive/utils/logs/ReleaseTree.java
@@ -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.utils.logs;
import android.util.Log;
diff --git a/app/src/main/java/foundation/e/drive/utils/ServiceExceptionHandler.java b/app/src/main/java/foundation/e/drive/utils/logs/ServiceExceptionHandler.java
similarity index 98%
rename from app/src/main/java/foundation/e/drive/utils/ServiceExceptionHandler.java
rename to app/src/main/java/foundation/e/drive/utils/logs/ServiceExceptionHandler.java
index 24074649b2c3f8fb045e2ebc13b99c6d97bb7c48..cec161fd789fe9769237c0bcb0eb976633e81ebe 100644
--- a/app/src/main/java/foundation/e/drive/utils/ServiceExceptionHandler.java
+++ b/app/src/main/java/foundation/e/drive/utils/logs/ServiceExceptionHandler.java
@@ -6,7 +6,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.utils.logs;
import android.app.Service;
import android.os.Environment;
diff --git a/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java b/app/src/main/java/foundation/e/drive/workers/AccountUserInfoWorker.java
similarity index 97%
rename from app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java
rename to app/src/main/java/foundation/e/drive/workers/AccountUserInfoWorker.java
index 2326515fa52a1dfea45cab07d6251bb7f75c2233..46c3d83d9193b6bb89bfe08219841eefff8e13f9 100644
--- a/app/src/main/java/foundation/e/drive/work/AccountUserInfoWorker.java
+++ b/app/src/main/java/foundation/e/drive/workers/AccountUserInfoWorker.java
@@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
-package foundation.e.drive.work;
+package foundation.e.drive.workers;
import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_ALIAS_KEY;
import static foundation.e.drive.utils.AppConstants.ACCOUNT_DATA_EMAIL;
@@ -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.operations.GetAliasOperation;
+import foundation.e.drive.ui.activity.AccountsActivity;
+import foundation.e.drive.synchronizations.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/RecycleBinCleaningWorker.kt b/app/src/main/java/foundation/e/drive/workers/RecycleBinCleaningWorker.kt
similarity index 96%
rename from app/src/main/java/foundation/e/drive/work/RecycleBinCleaningWorker.kt
rename to app/src/main/java/foundation/e/drive/workers/RecycleBinCleaningWorker.kt
index 45328ed3589a82b870153b36ebee9c798d234632..1983cc9c9171f4be7381c45d7bf82e06c61b7252 100644
--- a/app/src/main/java/foundation/e/drive/work/RecycleBinCleaningWorker.kt
+++ b/app/src/main/java/foundation/e/drive/workers/RecycleBinCleaningWorker.kt
@@ -5,7 +5,7 @@
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/gpl.html
*/
-package foundation.e.drive.work
+package foundation.e.drive.workers
import android.content.Context
import androidx.work.Worker
diff --git a/app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java b/app/src/main/java/foundation/e/drive/workers/WorkRequestFactory.java
similarity index 88%
rename from app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java
rename to app/src/main/java/foundation/e/drive/workers/WorkRequestFactory.java
index 3b6a0892151eb1c74ff88426269270f2271c4fd1..fafa15db3641518d1bfe8b891d595d97858f939a 100644
--- a/app/src/main/java/foundation/e/drive/work/WorkRequestFactory.java
+++ b/app/src/main/java/foundation/e/drive/workers/WorkRequestFactory.java
@@ -6,18 +6,18 @@
* http://www.gnu.org/licenses/gpl.html
*/
-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;
+package foundation.e.drive.workers;
+
+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;
@@ -31,7 +31,12 @@ import androidx.work.PeriodicWorkRequest;
import java.security.InvalidParameterException;
import java.util.concurrent.TimeUnit;
+import foundation.e.drive.detections.workers.FullScanWorker;
+import foundation.e.drive.detections.workers.ListAppsWorker;
+import foundation.e.drive.detections.workers.PeriodicWorker;
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/contentScanner/LocalContentScannerTest.java b/app/src/test/java/foundation/e/drive/contentScanner/LocalContentScannerTest.java
index 118dd6a24bd509888f0191afd49ba06959414f11..e468a80974bb124d259f238e388b10301af9ed37 100644
--- a/app/src/test/java/foundation/e/drive/contentScanner/LocalContentScannerTest.java
+++ b/app/src/test/java/foundation/e/drive/contentScanner/LocalContentScannerTest.java
@@ -29,6 +29,7 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
+import foundation.e.drive.detections.contentScanners.LocalContentScanner;
import foundation.e.drive.models.SyncRequest;
import foundation.e.drive.models.SyncedFileState;
import foundation.e.drive.models.SyncedFolder;
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 ee0d7b75692b9c4357da686aef73cefca8d0fa44..55c712500abca80c15bbd28ecadc63ba955e85cf 100644
--- a/app/src/test/java/foundation/e/drive/contentScanner/LocalFileListerTest.java
+++ b/app/src/test/java/foundation/e/drive/contentScanner/LocalFileListerTest.java
@@ -31,6 +31,8 @@ import java.util.List;
import foundation.e.drive.TestUtils;
import foundation.e.drive.database.DbHelper;
+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;
diff --git a/app/src/test/java/foundation/e/drive/contentScanner/RemoteContentScannerTest.java b/app/src/test/java/foundation/e/drive/contentScanner/RemoteContentScannerTest.java
index ae291d142ad98c460f753647c765780cf0b10e85..25ef006d33e2a2e01a507a521adc4fdb5bd437f4 100644
--- a/app/src/test/java/foundation/e/drive/contentScanner/RemoteContentScannerTest.java
+++ b/app/src/test/java/foundation/e/drive/contentScanner/RemoteContentScannerTest.java
@@ -31,6 +31,7 @@ import java.util.List;
import foundation.e.drive.TestUtils;
import foundation.e.drive.database.DbHelper;
+import foundation.e.drive.detections.contentScanners.RemoteContentScanner;
import foundation.e.drive.models.SyncRequest;
import foundation.e.drive.models.SyncedFileState;
import foundation.e.drive.models.SyncedFolder;
diff --git a/app/src/test/java/foundation/e/drive/contentScanner/RemoteFileListerTest.java b/app/src/test/java/foundation/e/drive/contentScanner/RemoteFileListerTest.java
index 5e3e2431f60024b808e207585e0b1732a74d3ad5..909c17cbd113f570eeb6b1d476ead016dc996ecf 100644
--- a/app/src/test/java/foundation/e/drive/contentScanner/RemoteFileListerTest.java
+++ b/app/src/test/java/foundation/e/drive/contentScanner/RemoteFileListerTest.java
@@ -37,6 +37,7 @@ import java.util.List;
import foundation.e.drive.TestUtils;
import foundation.e.drive.database.DbHelper;
+import foundation.e.drive.detections.listers.RemoteFileLister;
import foundation.e.drive.models.SyncedFileState;
import foundation.e.drive.models.SyncedFolder;
import foundation.e.drive.utils.DavClientProvider;
diff --git a/app/src/test/java/foundation/e/drive/operations/UploadFileOperationTest.java b/app/src/test/java/foundation/e/drive/operations/UploadFileOperationTest.java
index 2ba3e269162d81417df1d3c48c747eee32e78e38..aa1a8afc25c20ea08402435fa239d7fc3e4eed4f 100644
--- a/app/src/test/java/foundation/e/drive/operations/UploadFileOperationTest.java
+++ b/app/src/test/java/foundation/e/drive/operations/UploadFileOperationTest.java
@@ -38,7 +38,7 @@ import foundation.e.drive.database.DbHelper;
import foundation.e.drive.models.SyncedFileState;
import foundation.e.drive.models.SyncedFolder;
import foundation.e.drive.TestUtils;
-import foundation.e.drive.utils.CommonUtils;
+import foundation.e.drive.synchronizations.operations.UploadFileOperation;
import foundation.e.drive.utils.DavClientProvider;
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 725d8bd8d080d4297568813adaecf2db5dd36099..6963501f8802903c9cf71da4d467b58d1a58a68d 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 2a25755e1a07f0b0b5c2e9a8b4ae1c1c92218b6d..27428cb771761f5af570187daa74881c61f12c11 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,14 @@ 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.detections.ObserverService;
import foundation.e.drive.models.SyncedFolder;
+import foundation.e.drive.setup.InitializerService;
+import foundation.e.drive.synchronizations.SynchronizationService;
import foundation.e.drive.utils.AppConstants;
import foundation.e.drive.utils.CommonUtils;