mirror of
https://invent.kde.org/network/kdeconnect-android.git
synced 2025-10-06 00:23:01 +02:00
ContactsHelper: Do not split in lines to then join them again
This commit is contained in:
@@ -152,10 +152,10 @@ public class ContactsHelper {
|
|||||||
|
|
||||||
try (InputStream input = context.getContentResolver().openInputStream(vcardURI)) {
|
try (InputStream input = context.getContentResolver().openInputStream(vcardURI)) {
|
||||||
if (input == null) {
|
if (input == null) {
|
||||||
throw new NullPointerException("ContentResolver did not give us a stream for the VCard for uID " + ID);
|
Log.w("Contacts", "ContentResolver did not give us a stream for the VCard for uID " + ID);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
final List<String> lines = IOUtils.readLines(input, Charsets.UTF_8);
|
toReturn.put(ID, new VCardBuilder(IOUtils.toString(input, Charsets.UTF_8)));
|
||||||
toReturn.put(ID, new VCardBuilder(StringUtils.join(lines, '\n')));
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// If you are experiencing this, please open a bug report indicating how you got here
|
// If you are experiencing this, please open a bug report indicating how you got here
|
||||||
Log.e("Contacts", "Exception while fetching vcards", e);
|
Log.e("Contacts", "Exception while fetching vcards", e);
|
||||||
|
Reference in New Issue
Block a user