mirror of
https://github.com/nextcloud/android.git
synced 2024-11-22 21:25:35 +03:00
Fix Imports from UploadUtils to PowerUtils
This commit is contained in:
parent
ba7ee747d3
commit
f08675382a
3 changed files with 7 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue