mirror of
https://github.com/M66B/FairEmail.git
synced 2026-03-27 11:25:13 +01:00
Stop services before import
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user