mirror of
https://github.com/nextcloud/android.git
synced 2024-11-25 22:55:46 +03:00
Rebase master
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
b198f94873
commit
02287fd80b
62 changed files with 93 additions and 94 deletions
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.files.download
|
||||
|
||||
import androidx.test.core.app.ApplicationProvider.getApplicationContext
|
||||
import androidx.test.rule.ServiceTestRule
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.files.download
|
||||
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.files.DownloadRequest
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.files.download
|
||||
|
||||
import android.content.ComponentName
|
||||
import android.content.Context
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.files.download
|
||||
|
||||
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
|
||||
import com.nextcloud.client.account.User
|
|
@ -21,7 +21,7 @@ import com.nextcloud.client.account.UserAccountManager;
|
|||
import com.nextcloud.client.account.UserAccountManagerImpl;
|
||||
import com.nextcloud.client.device.BatteryStatus;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.files.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.Connectivity;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.nextcloud.client.preferences.AppPreferencesImpl;
|
||||
|
|
|
@ -13,7 +13,7 @@ import com.nextcloud.client.account.UserAccountManager;
|
|||
import com.nextcloud.client.account.UserAccountManagerImpl;
|
||||
import com.nextcloud.client.device.BatteryStatus;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.files.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.Connectivity;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.nextcloud.java.util.Optional;
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.owncloud.android;
|
|||
import com.nextcloud.client.account.UserAccountManagerImpl;
|
||||
import com.nextcloud.client.device.BatteryStatus;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.files.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.Connectivity;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
|
|
|
@ -26,8 +26,8 @@ import com.nextcloud.client.account.UserAccountManager
|
|||
import com.nextcloud.client.account.UserAccountManagerImpl
|
||||
import com.nextcloud.client.device.BatteryStatus
|
||||
import com.nextcloud.client.device.PowerManagementService
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.files.upload.FileUploadHelper
|
||||
import com.nextcloud.client.files.upload.FileUploadWorker
|
||||
import com.nextcloud.client.network.Connectivity
|
||||
import com.nextcloud.client.network.ConnectivityService
|
||||
import com.owncloud.android.AbstractOnServerIT
|
||||
|
|
|
@ -2,7 +2,7 @@ package com.owncloud.android.ui.helpers
|
|||
|
||||
import android.net.Uri
|
||||
import androidx.test.core.app.launchActivity
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.files.upload.FileUploadWorker
|
||||
import com.nextcloud.test.TestActivity
|
||||
import com.owncloud.android.AbstractIT
|
||||
import org.junit.Assert
|
||||
|
|
|
@ -25,9 +25,9 @@ package com.owncloud.android.utils;
|
|||
import android.content.Context;
|
||||
|
||||
import com.nextcloud.client.account.UserAccountManager;
|
||||
import com.nextcloud.client.preferences.AppPreferencesImpl;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.datamodel.SignatureVerification;
|
||||
import com.nextcloud.client.preferences.AppPreferencesImpl;
|
||||
|
||||
import java.security.Key;
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@
|
|||
android:name="com.nextcloud.client.jobs.NotificationWork$NotificationReceiver"
|
||||
android:exported="false" />
|
||||
<receiver
|
||||
android:name="com.nextcloud.client.files.uploader.FileUploadWorker$Companion$UploadNotificationActionReceiver"
|
||||
android:name="com.nextcloud.client.jobs.upload.FileUploadWorker$Companion$UploadNotificationActionReceiver"
|
||||
android:exported="false" />
|
||||
<receiver
|
||||
android:name="com.nextcloud.client.widget.DashboardWidgetProvider"
|
||||
|
@ -394,7 +394,7 @@
|
|||
android:name=".services.OperationsService"
|
||||
android:exported="false" />
|
||||
<service
|
||||
android:name="com.nextcloud.client.files.transfer.FileTransferService"
|
||||
android:name="com.nextcloud.client.jobs.transfer.FileTransferService"
|
||||
android:foregroundServiceType="dataSync"
|
||||
android:exported="false" />
|
||||
<service
|
||||
|
|
|
@ -29,9 +29,9 @@ import androidx.lifecycle.MutableLiveData
|
|||
import androidx.lifecycle.viewModelScope
|
||||
import com.nextcloud.client.account.CurrentAccountProvider
|
||||
import com.nextcloud.client.di.IoDispatcher
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker
|
||||
import com.nextcloud.client.logger.Logger
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.files.services.NameCollisionPolicy
|
||||
|
|
|
@ -32,8 +32,8 @@ import androidx.work.WorkerParameters
|
|||
import com.nextcloud.client.account.AnonymousUser
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.account.UserAccountManager
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker
|
||||
import com.nextcloud.client.logger.Logger
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
|
|
|
@ -34,8 +34,8 @@ import androidx.core.view.WindowCompat
|
|||
import androidx.core.view.WindowInsetsCompat
|
||||
import com.canhub.cropper.CropImageView
|
||||
import com.nextcloud.client.di.Injectable
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker
|
||||
import com.nextcloud.utils.extensions.getParcelableArgument
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.databinding.ActivityEditImageBinding
|
||||
|
|
|
@ -35,9 +35,9 @@ import com.nextcloud.client.etm.pages.EtmBackgroundJobsFragment
|
|||
import com.nextcloud.client.etm.pages.EtmFileTransferFragment
|
||||
import com.nextcloud.client.etm.pages.EtmMigrations
|
||||
import com.nextcloud.client.etm.pages.EtmPreferencesFragment
|
||||
import com.nextcloud.client.files.transfer.TransferManagerConnection
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager
|
||||
import com.nextcloud.client.jobs.JobInfo
|
||||
import com.nextcloud.client.jobs.transfer.TransferManagerConnection
|
||||
import com.nextcloud.client.migrations.MigrationInfo
|
||||
import com.nextcloud.client.migrations.MigrationsDb
|
||||
import com.nextcloud.client.migrations.MigrationsManager
|
||||
|
|
|
@ -15,8 +15,8 @@ import androidx.recyclerview.widget.RecyclerView
|
|||
import com.nextcloud.client.etm.EtmBaseFragment
|
||||
import com.nextcloud.client.files.DownloadRequest
|
||||
import com.nextcloud.client.files.UploadRequest
|
||||
import com.nextcloud.client.files.transfer.Transfer
|
||||
import com.nextcloud.client.files.transfer.TransferManager
|
||||
import com.nextcloud.client.jobs.transfer.Transfer
|
||||
import com.nextcloud.client.jobs.transfer.TransferManager
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.db.OCUpload
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
*/
|
||||
package com.nextcloud.client.files
|
||||
|
||||
import com.nextcloud.client.files.transfer.Transfer
|
||||
import com.nextcloud.client.files.transfer.TransferState
|
||||
import com.nextcloud.client.jobs.transfer.Transfer
|
||||
import com.nextcloud.client.jobs.transfer.TransferState
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import java.util.UUID
|
||||
import kotlin.math.max
|
||||
|
|
|
@ -23,8 +23,8 @@ package com.nextcloud.client.files
|
|||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.files.upload.PostUploadAction
|
||||
import com.nextcloud.client.files.upload.UploadTrigger
|
||||
import com.nextcloud.client.jobs.upload.PostUploadAction
|
||||
import com.nextcloud.client.jobs.upload.UploadTrigger
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.datamodel.UploadsStorageManager
|
||||
import com.owncloud.android.db.OCUpload
|
||||
|
|
|
@ -36,9 +36,9 @@ import androidx.work.WorkerParameters
|
|||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.account.UserAccountManager
|
||||
import com.nextcloud.client.files.UploadRequest
|
||||
import com.nextcloud.client.files.transfer.TransferManagerConnection
|
||||
import com.nextcloud.client.files.upload.PostUploadAction
|
||||
import com.nextcloud.client.files.upload.UploadTrigger
|
||||
import com.nextcloud.client.jobs.transfer.TransferManagerConnection
|
||||
import com.nextcloud.client.jobs.upload.PostUploadAction
|
||||
import com.nextcloud.client.jobs.upload.UploadTrigger
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
|
|
|
@ -33,7 +33,7 @@ import androidx.core.app.NotificationCompat
|
|||
import androidx.work.Worker
|
||||
import androidx.work.WorkerParameters
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.files.downloader.FileDownloadHelper
|
||||
import com.nextcloud.client.jobs.download.FileDownloadHelper
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
|
|
|
@ -34,8 +34,8 @@ import androidx.work.ForegroundInfo
|
|||
import androidx.work.WorkerParameters
|
||||
import com.nextcloud.client.account.UserAccountManager
|
||||
import com.nextcloud.client.device.PowerManagementService
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker
|
||||
import com.nextcloud.client.network.ConnectivityService
|
||||
import com.nextcloud.client.preferences.SubFolderRule
|
||||
import com.owncloud.android.R
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.jobs.download
|
||||
|
||||
import android.app.Notification
|
||||
import android.app.NotificationManager
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.jobs.download
|
||||
|
||||
import android.content.ContentResolver
|
||||
import android.content.Context
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.jobs.download
|
||||
|
||||
enum class FileDownloadError {
|
||||
Failed, Cancelled
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.jobs.download
|
||||
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.jobs.download
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.downloader
|
||||
package com.nextcloud.client.jobs.download
|
||||
|
||||
import android.accounts.Account
|
||||
import android.accounts.AccountManager
|
||||
|
@ -108,7 +108,7 @@ class FileDownloadWorker(
|
|||
private var lastPercent = 0
|
||||
|
||||
private val intents = FileDownloadIntents(context)
|
||||
private lateinit var notificationManager: DownloadNotificationManager
|
||||
private lateinit var notificationManager: com.nextcloud.client.jobs.download.DownloadNotificationManager
|
||||
private var downloadProgressListener = FileDownloadProgressListener()
|
||||
|
||||
private var user: User? = null
|
||||
|
@ -126,7 +126,11 @@ class FileDownloadWorker(
|
|||
val requestDownloads = getRequestDownloads()
|
||||
|
||||
notificationManager =
|
||||
DownloadNotificationManager(workerId ?: SecureRandom().nextInt(), context, viewThemeUtils)
|
||||
com.nextcloud.client.jobs.download.DownloadNotificationManager(
|
||||
workerId ?: SecureRandom().nextInt(),
|
||||
context,
|
||||
viewThemeUtils
|
||||
)
|
||||
addAccountUpdateListener()
|
||||
|
||||
val foregroundInfo = ForegroundServiceHelper.createWorkerForegroundInfo(
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.transfer
|
||||
package com.nextcloud.client.jobs.transfer
|
||||
|
||||
import android.app.Service
|
||||
import android.content.Context
|
||||
|
@ -30,8 +30,8 @@ import com.nextcloud.client.core.LocalBinder
|
|||
import com.nextcloud.client.device.PowerManagementService
|
||||
import com.nextcloud.client.files.Direction
|
||||
import com.nextcloud.client.files.Request
|
||||
import com.nextcloud.client.files.downloader.DownloadTask
|
||||
import com.nextcloud.client.files.upload.UploadTask
|
||||
import com.nextcloud.client.jobs.download.DownloadTask
|
||||
import com.nextcloud.client.jobs.upload.UploadTask
|
||||
import com.nextcloud.client.logger.Logger
|
||||
import com.nextcloud.client.network.ClientFactory
|
||||
import com.nextcloud.client.network.ConnectivityService
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.transfer
|
||||
package com.nextcloud.client.jobs.transfer
|
||||
|
||||
import com.nextcloud.client.files.Direction
|
||||
import com.nextcloud.client.files.DownloadRequest
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.transfer
|
||||
package com.nextcloud.client.jobs.transfer
|
||||
|
||||
import com.nextcloud.client.files.Request
|
||||
import com.owncloud.android.datamodel.OCFile
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.transfer
|
||||
package com.nextcloud.client.jobs.transfer
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.transfer
|
||||
package com.nextcloud.client.jobs.transfer
|
||||
|
||||
import com.nextcloud.client.core.AsyncRunner
|
||||
import com.nextcloud.client.core.IsCancelled
|
||||
|
@ -28,8 +28,8 @@ import com.nextcloud.client.files.DownloadRequest
|
|||
import com.nextcloud.client.files.Registry
|
||||
import com.nextcloud.client.files.Request
|
||||
import com.nextcloud.client.files.UploadRequest
|
||||
import com.nextcloud.client.files.downloader.DownloadTask
|
||||
import com.nextcloud.client.files.upload.UploadTask
|
||||
import com.nextcloud.client.jobs.download.DownloadTask
|
||||
import com.nextcloud.client.jobs.upload.UploadTask
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.operations.UploadFileOperation
|
||||
import java.util.UUID
|
|
@ -17,7 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.transfer
|
||||
package com.nextcloud.client.jobs.transfer
|
||||
|
||||
enum class TransferState {
|
||||
PENDING,
|
|
@ -19,12 +19,12 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.uploader
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.account.UserAccountManager
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker.Companion.currentUploadFileOperation
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker.Companion.currentUploadFileOperation
|
||||
import com.owncloud.android.MainApp
|
||||
import com.owncloud.android.datamodel.OCFile
|
||||
import com.owncloud.android.datamodel.UploadsStorageManager
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.uploader
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.uploader
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.uploader
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import android.app.PendingIntent
|
||||
import android.content.Context
|
|
@ -17,9 +17,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.upload
|
||||
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
enum class PostUploadAction(val value: Int) {
|
||||
NONE(FileUploadWorker.LOCAL_BEHAVIOUR_FORGET),
|
|
@ -19,7 +19,7 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.nextcloud.client.files.uploader
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import android.app.Notification
|
||||
import android.app.NotificationManager
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.upload
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import android.content.Context
|
||||
import com.nextcloud.client.account.User
|
|
@ -18,7 +18,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package com.nextcloud.client.files.upload
|
||||
package com.nextcloud.client.jobs.upload
|
||||
|
||||
import com.owncloud.android.operations.UploadFileOperation
|
||||
|
|
@ -27,8 +27,8 @@ import android.os.Parcel;
|
|||
import android.os.Parcelable;
|
||||
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.UploadsStorageManager;
|
||||
import com.owncloud.android.datamodel.UploadsStorageManager.UploadStatus;
|
||||
|
|
|
@ -23,7 +23,6 @@ package com.owncloud.android.operations;
|
|||
|
||||
import android.content.Context;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
import android.webkit.MimeTypeMap;
|
||||
|
||||
import com.nextcloud.client.account.User;
|
||||
|
|
|
@ -25,7 +25,7 @@ import android.content.Intent;
|
|||
import android.text.TextUtils;
|
||||
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.files.downloader.FileDownloadHelper;
|
||||
import com.nextcloud.client.jobs.download.FileDownloadHelper;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.datamodel.e2e.v1.decrypted.DecryptedFolderMetadataFileV1;
|
||||
|
@ -294,7 +294,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
|||
if (mLocalFolder.isEncrypted() && object == null) {
|
||||
throw new IllegalStateException("metadata is null!");
|
||||
}
|
||||
|
||||
|
||||
// get current data about local contents of the folder to synchronize
|
||||
Map<String, OCFile> localFilesMap;
|
||||
E2EVersion e2EVersion;
|
||||
|
@ -308,7 +308,7 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
|||
localFilesMap = RefreshFolderOperation.prefillLocalFilesMap((DecryptedFolderMetadataFile) object,
|
||||
storageManager.getFolderContent(mLocalFolder, false));
|
||||
}
|
||||
|
||||
|
||||
// loop to synchronize every child
|
||||
List<OCFile> updatedFiles = new ArrayList<>(folderAndFiles.size() - 1);
|
||||
OCFile remoteFile;
|
||||
|
@ -421,7 +421,6 @@ public class SynchronizeFolderOperation extends SyncOperation {
|
|||
}
|
||||
|
||||
|
||||
@SuppressFBWarnings("JLM")
|
||||
private void prepareOpsFromLocalKnowledge() throws OperationCancelledException {
|
||||
List<OCFile> children = getStorageManager().getFolderContent(mLocalFolder, false);
|
||||
for (OCFile child : children) {
|
||||
|
|
|
@ -29,7 +29,7 @@ import android.text.TextUtils;
|
|||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.device.BatteryStatus;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.Connectivity;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.owncloud.android.datamodel.ArbitraryDataProvider;
|
||||
|
|
|
@ -28,7 +28,7 @@ import android.os.Message;
|
|||
import android.util.Pair;
|
||||
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.files.downloader.FileDownloadWorker;
|
||||
import com.nextcloud.client.jobs.download.FileDownloadWorker;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.files.services.IndexedForest;
|
||||
import com.owncloud.android.lib.common.OwnCloudAccount;
|
||||
|
|
|
@ -59,8 +59,8 @@ import android.widget.Toast;
|
|||
import com.google.android.material.button.MaterialButton;
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.di.Injectable;
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.nextcloud.utils.extensions.BundleExtensionsKt;
|
||||
import com.nextcloud.utils.extensions.IntentExtensionsKt;
|
||||
|
@ -894,8 +894,7 @@ public class ReceiveExternalFilesActivity extends FileActivity
|
|||
UploadFileOperation.CREATED_BY_USER,
|
||||
false,
|
||||
false,
|
||||
NameCollisionPolicy.ASK_USER
|
||||
);
|
||||
NameCollisionPolicy.ASK_USER);
|
||||
finish();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,10 +40,10 @@ import androidx.recyclerview.widget.GridLayoutManager
|
|||
import com.nextcloud.client.core.Clock
|
||||
import com.nextcloud.client.device.PowerManagementService
|
||||
import com.nextcloud.client.di.Injectable
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager
|
||||
import com.nextcloud.client.jobs.MediaFoldersDetectionWork
|
||||
import com.nextcloud.client.jobs.NotificationWork
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker
|
||||
import com.nextcloud.client.preferences.AppPreferences
|
||||
import com.nextcloud.client.preferences.SubFolderRule
|
||||
import com.nextcloud.utils.extensions.getParcelableArgument
|
||||
|
|
|
@ -37,7 +37,7 @@ import android.widget.TextView;
|
|||
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.di.Injectable;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.databinding.UploadFilesLayoutBinding;
|
||||
|
|
|
@ -38,8 +38,8 @@ import com.nextcloud.client.account.User;
|
|||
import com.nextcloud.client.account.UserAccountManager;
|
||||
import com.nextcloud.client.core.Clock;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.nextcloud.client.utils.Throttler;
|
||||
import com.nextcloud.model.WorkerState;
|
||||
|
|
|
@ -46,7 +46,7 @@ import android.widget.LinearLayout;
|
|||
import com.elyeproj.loaderviewlibrary.LoaderImageView;
|
||||
import com.nextcloud.android.common.ui.theme.utils.ColorRole;
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper;
|
||||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.R;
|
||||
|
|
|
@ -43,8 +43,8 @@ import com.nextcloud.client.account.User;
|
|||
import com.nextcloud.client.account.UserAccountManager;
|
||||
import com.nextcloud.client.core.Clock;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.nextcloud.java.util.Optional;
|
||||
import com.owncloud.android.MainApp;
|
||||
|
|
|
@ -30,7 +30,7 @@ import android.provider.DocumentsContract;
|
|||
import android.widget.Toast;
|
||||
|
||||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.files.services.NameCollisionPolicy;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult.ResultCode;
|
||||
|
|
|
@ -23,7 +23,7 @@ package com.owncloud.android.ui.dialog.parcel;
|
|||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.preferences.SubFolderRule;
|
||||
import com.owncloud.android.datamodel.MediaFolderType;
|
||||
import com.owncloud.android.datamodel.SyncedFolderDisplayItem;
|
||||
|
|
|
@ -40,10 +40,10 @@ import com.nextcloud.client.account.UserAccountManager;
|
|||
import com.nextcloud.client.di.Injectable;
|
||||
import com.nextcloud.client.files.DownloadRequest;
|
||||
import com.nextcloud.client.files.Request;
|
||||
import com.nextcloud.client.files.transfer.Transfer;
|
||||
import com.nextcloud.client.files.transfer.TransferManagerConnection;
|
||||
import com.nextcloud.client.files.transfer.TransferState;
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager;
|
||||
import com.nextcloud.client.jobs.transfer.Transfer;
|
||||
import com.nextcloud.client.jobs.transfer.TransferManagerConnection;
|
||||
import com.nextcloud.client.jobs.transfer.TransferState;
|
||||
import com.nextcloud.client.network.ClientFactory;
|
||||
import com.nextcloud.utils.extensions.BundleExtensionsKt;
|
||||
import com.owncloud.android.R;
|
||||
|
|
|
@ -23,7 +23,7 @@ import android.content.ContentResolver
|
|||
import android.net.Uri
|
||||
import android.os.Parcelable
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.jobs.upload.FileUploadHelper
|
||||
import com.owncloud.android.R
|
||||
import com.owncloud.android.files.services.NameCollisionPolicy
|
||||
import com.owncloud.android.lib.common.utils.Log_OC
|
||||
|
|
|
@ -62,8 +62,8 @@ import androidx.media3.ui.PlayerView
|
|||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.account.UserAccountManager
|
||||
import com.nextcloud.client.di.Injectable
|
||||
import com.nextcloud.client.files.downloader.FileDownloadHelper
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager
|
||||
import com.nextcloud.client.jobs.download.FileDownloadHelper
|
||||
import com.nextcloud.client.media.ExoplayerListener
|
||||
import com.nextcloud.client.media.NextcloudExoPlayer.createNextcloudExoplayer
|
||||
import com.nextcloud.client.media.PlayerServiceConnection
|
||||
|
|
|
@ -53,8 +53,8 @@ import android.view.ViewGroup;
|
|||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.account.UserAccountManager;
|
||||
import com.nextcloud.client.di.Injectable;
|
||||
import com.nextcloud.client.files.downloader.FileDownloadHelper;
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager;
|
||||
import com.nextcloud.client.jobs.download.FileDownloadHelper;
|
||||
import com.nextcloud.client.media.ExoplayerListener;
|
||||
import com.nextcloud.client.media.NextcloudExoPlayer;
|
||||
import com.nextcloud.client.media.PlayerServiceConnection;
|
||||
|
|
|
@ -33,8 +33,8 @@ import android.provider.MediaStore;
|
|||
import com.nextcloud.client.account.UserAccountManager;
|
||||
import com.nextcloud.client.device.BatteryStatus;
|
||||
import com.nextcloud.client.device.PowerManagementService;
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.jobs.BackgroundJobManager;
|
||||
import com.nextcloud.client.jobs.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.network.ConnectivityService;
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.datamodel.FilesystemDataProvider;
|
||||
|
|
|
@ -44,9 +44,9 @@ import android.widget.EditText;
|
|||
import com.nextcloud.client.account.User;
|
||||
import com.nextcloud.client.files.Request;
|
||||
import com.nextcloud.client.files.UploadRequest;
|
||||
import com.nextcloud.client.files.transfer.TransferManagerConnection;
|
||||
import com.nextcloud.client.files.upload.PostUploadAction;
|
||||
import com.nextcloud.client.files.upload.UploadTrigger;
|
||||
import com.nextcloud.client.jobs.transfer.TransferManagerConnection;
|
||||
import com.nextcloud.client.jobs.upload.PostUploadAction;
|
||||
import com.nextcloud.client.jobs.upload.UploadTrigger;
|
||||
import com.nextcloud.client.preferences.AppPreferences;
|
||||
import com.owncloud.android.R;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
package com.owncloud.android.ui.activity;
|
||||
|
||||
import com.nextcloud.client.files.uploader.FileUploadWorker;
|
||||
import com.nextcloud.client.files.upload.FileUploadWorker;
|
||||
import com.nextcloud.client.preferences.SubFolderRule;
|
||||
import com.owncloud.android.datamodel.MediaFolderType;
|
||||
import com.owncloud.android.datamodel.SyncedFolderDisplayItem;
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.owncloud.android.ui.adapter
|
|||
|
||||
import android.content.Context
|
||||
import com.nextcloud.client.account.User
|
||||
import com.nextcloud.client.files.uploader.FileUploadHelper
|
||||
import com.nextcloud.client.files.upload.FileUploadHelper
|
||||
import com.nextcloud.client.preferences.AppPreferences
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager
|
||||
import com.owncloud.android.datamodel.GalleryItems
|
||||
|
|
Loading…
Reference in a new issue