Fix Imports from UploadUtils to PowerUtils

This commit is contained in:
AndyScherzinger 2017-11-28 14:42:06 +01:00
parent ba7ee747d3
commit f08675382a
No known key found for this signature in database
GPG key ID: 6CADC7E3523C308B
3 changed files with 7 additions and 8 deletions

View file

@ -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);
}

View file

@ -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;
}

View file

@ -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);