Added fail safe

pull/207/head
M66B 3 years ago
parent 21cfc7a0b5
commit baa2bdcdaf

@ -126,17 +126,19 @@ public class EmailProvider implements Parcelable {
executor.submit(new Runnable() { executor.submit(new Runnable() {
@Override @Override
public void run() { public void run() {
try {
File file = new File(context.getFilesDir(), "providers.xml"); File file = new File(context.getFilesDir(), "providers.xml");
if (file.exists()) { if (file.exists()) {
try (FileInputStream is = new FileInputStream(file)) { try (FileInputStream is = new FileInputStream(file)) {
XmlPullParser parser = Xml.newPullParser(); XmlPullParser parser = Xml.newPullParser();
parser.setInput(is, null); parser.setInput(is, null);
imported = parseProfiles(parser); imported = parseProfiles(parser);
}
}
} catch (Throwable ex) { } catch (Throwable ex) {
Log.e(ex); Log.e(ex);
} }
} }
}
}); });
} }

Loading…
Cancel
Save