Adding logs in contact editor

This commit is contained in:
Sylvain Berfini 2019-03-20 11:29:56 +01:00
parent 94d13a877f
commit 15cf3663ae

View file

@ -165,12 +165,15 @@ public class ContactEditorFragment extends Fragment {
for (LinphoneNumberOrAddress noa : mNumbersAndAddresses) { for (LinphoneNumberOrAddress noa : mNumbersAndAddresses) {
if (noa.getValue() == null || noa.getValue().isEmpty()) { if (noa.getValue() == null || noa.getValue().isEmpty()) {
if (noa.getOldValue() != null && !noa.getOldValue().isEmpty()) { if (noa.getOldValue() != null && !noa.getOldValue().isEmpty()) {
Log.i("[Contact Editor] Removing number " + noa.getOldValue());
mContact.removeNumberOrAddress(noa); mContact.removeNumberOrAddress(noa);
} }
} else { } else {
if (noa.getOldValue() != null if (noa.getOldValue() != null
&& !noa.getOldValue().isEmpty()
&& noa.getOldValue().equals(noa.getValue())) { && noa.getOldValue().equals(noa.getValue())) {
Log.i(
"[Contact Editor] Keeping existing number "
+ noa.getValue());
continue; continue;
} }
@ -179,6 +182,7 @@ public class ContactEditorFragment extends Fragment {
LinphoneUtils.getFullAddressFromUsername( LinphoneUtils.getFullAddressFromUsername(
noa.getValue())); noa.getValue()));
} }
Log.i("[Contact Editor] Adding new number " + noa.getValue());
mContact.addOrUpdateNumberOrAddress(noa); mContact.addOrUpdateNumberOrAddress(noa);
} }
} }