From 77fabb2d3785f6b5a2ecc4c9e00ebf01433d0964 Mon Sep 17 00:00:00 2001 From: M66B Date: Wed, 24 Oct 2018 11:14:56 +0000 Subject: [PATCH] Fixed import/export --- app/src/main/java/eu/faircode/email/EntityAccount.java | 4 ++++ app/src/main/java/eu/faircode/email/EntityIdentity.java | 2 ++ app/src/main/java/eu/faircode/email/FragmentSetup.java | 2 ++ 3 files changed, 8 insertions(+) diff --git a/app/src/main/java/eu/faircode/email/EntityAccount.java b/app/src/main/java/eu/faircode/email/EntityAccount.java index 4e0881f9..69670f8d 100644 --- a/app/src/main/java/eu/faircode/email/EntityAccount.java +++ b/app/src/main/java/eu/faircode/email/EntityAccount.java @@ -91,6 +91,8 @@ public class EntityAccount { json.put("name", name); json.put("signature", signature); json.put("host", host); + json.put("starttls", starttls); + json.put("insecure", insecure); json.put("port", port); json.put("user", user); json.put("password", ""); @@ -110,6 +112,8 @@ public class EntityAccount { if (json.has("signature")) account.signature = json.getString("signature"); account.host = json.getString("host"); + account.starttls = (json.has("starttls") && json.getBoolean("starttls")); + account.insecure = (json.has("insecure") && json.getBoolean("insecure")); account.port = json.getInt("port"); account.user = json.getString("user"); account.password = json.getString("password"); diff --git a/app/src/main/java/eu/faircode/email/EntityIdentity.java b/app/src/main/java/eu/faircode/email/EntityIdentity.java index 60ebc76b..8dbe5901 100644 --- a/app/src/main/java/eu/faircode/email/EntityIdentity.java +++ b/app/src/main/java/eu/faircode/email/EntityIdentity.java @@ -82,6 +82,7 @@ public class EntityIdentity { json.put("host", host); json.put("port", port); json.put("starttls", starttls); + json.put("insecure", insecure); json.put("user", user); json.put("password", ""); json.put("auth_type", auth_type); @@ -100,6 +101,7 @@ public class EntityIdentity { identity.host = json.getString("host"); identity.port = json.getInt("port"); identity.starttls = json.getBoolean("starttls"); + identity.insecure = (json.has("insecure") && json.getBoolean("insecure")); identity.user = json.getString("user"); identity.password = json.getString("password"); identity.auth_type = json.getInt("auth_type"); diff --git a/app/src/main/java/eu/faircode/email/FragmentSetup.java b/app/src/main/java/eu/faircode/email/FragmentSetup.java index a6ec939d..1fc639db 100644 --- a/app/src/main/java/eu/faircode/email/FragmentSetup.java +++ b/app/src/main/java/eu/faircode/email/FragmentSetup.java @@ -106,6 +106,8 @@ public class FragmentSetup extends FragmentEx { "light", "browse", "swipe", + "compat", + "insecure", "sort" );