mirror of https://github.com/M66B/FairEmail.git
Stop services before import
This commit is contained in:
parent
0eb7b23bc4
commit
61e6dcf2ea
|
@ -739,6 +739,9 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
|||
|
||||
NoStreamException.check(uri, context);
|
||||
|
||||
ServiceSynchronize.stop(context);
|
||||
ServiceSend.stop(context);
|
||||
|
||||
StringBuilder data = new StringBuilder();
|
||||
Log.i("Reading URI=" + uri);
|
||||
ContentResolver resolver = context.getContentResolver();
|
||||
|
@ -1251,7 +1254,6 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
|||
db.endTransaction();
|
||||
}
|
||||
|
||||
ServiceSynchronize.eval(context, "import");
|
||||
Log.i("Imported data");
|
||||
|
||||
SpannableStringBuilder ssb = new SpannableStringBuilderEx();
|
||||
|
@ -1261,6 +1263,11 @@ public class FragmentOptionsBackup extends FragmentBase implements SharedPrefere
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onExecuted(Bundle args, Void data) {
|
||||
ServiceSynchronize.eval(context, "import");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onException(Bundle args, Throwable ex) {
|
||||
if (ex instanceof NoStreamException)
|
||||
|
|
Loading…
Reference in New Issue