2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Add fallback in case the contact does not have a name

Basically set the phoneNumber as name as it was before this change.

REVIEW: 127297
This commit is contained in:
Àlex Fiestas
2016-03-07 11:38:19 +01:00
parent 76eb88b51f
commit 17d5eeade0

View File

@@ -106,6 +106,8 @@ public class TelephonyPlugin extends Plugin {
if (contactInfo.containsKey("name")) { if (contactInfo.containsKey("name")) {
np.set("contactName", contactInfo.get("name")); np.set("contactName", contactInfo.get("name"));
} else {
np.set("contactName", phoneNumber);
} }
if (contactInfo.containsKey("photoID")) { if (contactInfo.containsKey("photoID")) {