|
@@ -354,7 +354,8 @@ public class UploadFileOperation extends SyncOperation {
|
|
|
}
|
|
|
|
|
|
// Check if charging conditions are met and delays the upload otherwise
|
|
|
- if (mWhileChargingOnly && !Device.getBatteryStatus(mContext).isCharging()) {
|
|
|
+ if (mWhileChargingOnly && (!Device.getBatteryStatus(mContext).isCharging() && Device.getBatteryStatus
|
|
|
+ (mContext).getBatteryPercent() < 1)) {
|
|
|
Log_OC.d(TAG, "Upload delayed until the device is charging: " + getRemotePath());
|
|
|
return new RemoteOperationResult(ResultCode.DELAYED_FOR_CHARGING);
|
|
|
}
|