Commit 90870ae4 authored by Sergey Galin's avatar Sergey Galin

Style

parent da0e492b
......@@ -144,11 +144,17 @@ bool sendEmail(
{
QJniEnvPtr jep;
QJniLocalRef attachment_array{jep.env()->NewObjectArray(attachment.size(), QJniClass{"java/lang/String"}.jClass(), nullptr)};
QJniLocalRef attachment_array(jep.env()->NewObjectArray(
attachment.size()
, QJniClass("java/lang/String").jClass()
, nullptr));
for (QStringList::size_type i = 0; i < attachment.size(); ++i)
{
jep.env()->SetObjectArrayElement(static_cast<jobjectArray>(attachment_array.jObject()), i, QJniLocalRef{attachment[i]}.jObject());
jep.env()->SetObjectArrayElement(
static_cast<jobjectArray>(attachment_array.jObject())
, i
, QJniLocalRef(attachment[i]).jObject());
}
QJniClass du(c_full_class_name_);
......
......@@ -291,7 +291,15 @@ public class DesktopUtils
}
}
public static boolean sendEmail(final Context ctx, final String to, final String subject, final String body, final String[] attachment, final String authorities) {
public static boolean sendEmail(
final Context ctx
, final String to
, final String subject
, final String body
, final String[] attachment
, final String authorities)
{
try
{
final String[] recipients = new String[]{ to };
......@@ -427,7 +435,7 @@ public class DesktopUtils
Log.d(TAG, "Will open file: "+fileName);
try
{
Intent intent =new Intent(Intent.ACTION_VIEW);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
File file = new File(fileName);
intent.setDataAndType(Uri.fromFile(file), mimeType);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment