From f08675382aeb53332dea7b03b0c47df1ead4d3aa Mon Sep 17 00:00:00 2001 From: AndyScherzinger Date: Tue, 28 Nov 2017 14:42:06 +0100 Subject: [PATCH] Fix Imports from UploadUtils to PowerUtils --- .../com/owncloud/android/files/services/FileUploader.java | 7 +++---- src/main/java/com/owncloud/android/jobs/FilesSyncJob.java | 4 ++-- .../com/owncloud/android/jobs/NContentObserverJob.java | 4 ++-- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/owncloud/android/files/services/FileUploader.java b/src/main/java/com/owncloud/android/files/services/FileUploader.java index dd45adb5e3..00da60ed60 100644 --- a/src/main/java/com/owncloud/android/files/services/FileUploader.java +++ b/src/main/java/com/owncloud/android/files/services/FileUploader.java @@ -72,8 +72,8 @@ import com.owncloud.android.ui.activity.FileActivity; import com.owncloud.android.ui.activity.UploadListActivity; import com.owncloud.android.ui.notifications.NotificationUtils; import com.owncloud.android.utils.ErrorMessageAdapter; +import com.owncloud.android.utils.PowerUtils; import com.owncloud.android.utils.ThemeUtils; -import com.owncloud.android.utils.UploadUtils; import java.io.File; import java.util.AbstractList; @@ -925,9 +925,8 @@ public class FileUploader extends Service !Device.getBatteryStatus(MainApp.getAppContext()).isCharging()) { cancel(mCurrentUpload.getAccount().name, mCurrentUpload.getFile().getRemotePath() , ResultCode.DELAYED_FOR_CHARGING); - } else if ( - !mCurrentUpload.getIsIgnoringPowerSaveMode() && - UploadUtils.isPowerSaveMode(MainApp.getAppContext())) { + } else if (!mCurrentUpload.getIsIgnoringPowerSaveMode() && + PowerUtils.isPowerSaveMode(MainApp.getAppContext())) { cancel(mCurrentUpload.getAccount().name, mCurrentUpload.getFile().getRemotePath() , ResultCode.DELAYED_IN_POWER_SAVE_MODE); } diff --git a/src/main/java/com/owncloud/android/jobs/FilesSyncJob.java b/src/main/java/com/owncloud/android/jobs/FilesSyncJob.java index 904b82e757..fa73fa764f 100644 --- a/src/main/java/com/owncloud/android/jobs/FilesSyncJob.java +++ b/src/main/java/com/owncloud/android/jobs/FilesSyncJob.java @@ -47,7 +47,7 @@ import com.owncloud.android.ui.activity.Preferences; import com.owncloud.android.utils.FileStorageUtils; import com.owncloud.android.utils.FilesSyncHelper; import com.owncloud.android.utils.MimeTypeUtil; -import com.owncloud.android.utils.UploadUtils; +import com.owncloud.android.utils.PowerUtils; import java.io.File; import java.io.IOException; @@ -86,7 +86,7 @@ public class FilesSyncJob extends Job { final boolean overridePowerSaving = bundle.getBoolean(OVERRIDE_POWER_SAVING, false); // If we are in power save mode, better to postpone upload - if (UploadUtils.isPowerSaveMode(context) && !overridePowerSaving) { + if (PowerUtils.isPowerSaveMode(context) && !overridePowerSaving) { return Result.SUCCESS; } diff --git a/src/main/java/com/owncloud/android/jobs/NContentObserverJob.java b/src/main/java/com/owncloud/android/jobs/NContentObserverJob.java index 3bbdf90023..5f86d2cbc0 100644 --- a/src/main/java/com/owncloud/android/jobs/NContentObserverJob.java +++ b/src/main/java/com/owncloud/android/jobs/NContentObserverJob.java @@ -29,7 +29,7 @@ import android.support.annotation.RequiresApi; import com.evernote.android.job.JobRequest; import com.evernote.android.job.util.support.PersistableBundleCompat; import com.owncloud.android.utils.FilesSyncHelper; -import com.owncloud.android.utils.UploadUtils; +import com.owncloud.android.utils.PowerUtils; /* Job that triggers new FilesSyncJob in case new photo or video were detected @@ -43,7 +43,7 @@ public class NContentObserverJob extends JobService { if (params.getJobId() == FilesSyncHelper.ContentSyncJobId && params.getTriggeredContentAuthorities() != null && params.getTriggeredContentUris() != null && params.getTriggeredContentUris().length > 0 - && !UploadUtils.isPowerSaveMode(getApplicationContext())) { + && !PowerUtils.isPowerSaveMode(getApplicationContext())) { PersistableBundleCompat persistableBundleCompat = new PersistableBundleCompat(); persistableBundleCompat.putBoolean(FilesSyncJob.SKIP_CUSTOM, true);