Prevent crash

This commit is contained in:
M66B 2019-08-29 17:28:04 +02:00
parent d96fd810cf
commit ed5b547284
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import org.json.JSONException;
import org.json.JSONObject; import org.json.JSONObject;
import java.io.File; import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
@ -1078,7 +1079,7 @@ public abstract class DB extends RoomDatabase {
String personal = jaddress.optString("personal"); String personal = jaddress.optString("personal");
if (TextUtils.isEmpty(personal)) if (TextUtils.isEmpty(personal))
personal = null; personal = null;
result.add(new InternetAddress(email, personal)); result.add(new InternetAddress(email, personal, StandardCharsets.UTF_8.name()));
} }
} catch (Throwable ex) { } catch (Throwable ex) {
// Compose can store invalid addresses // Compose can store invalid addresses