Fix add contact from dialer or history
This commit is contained in:
parent
7596f7300b
commit
36240ca612
1 changed files with 12 additions and 1 deletions
|
@ -58,6 +58,7 @@ public class EditContactFragment extends Fragment {
|
|||
}
|
||||
if (getArguments().getString("NewSipAdress") != null) {
|
||||
newSipOrNumberToAdd = getArguments().getString("NewSipAdress");
|
||||
isNewContact = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -263,7 +264,11 @@ public class EditContactFragment extends Fragment {
|
|||
if (forceAddNumber) {
|
||||
tempNounoa = new NewOrUpdatedNumberOrAddress(isSip);
|
||||
} else {
|
||||
tempNounoa = new NewOrUpdatedNumberOrAddress(numberOrAddress, isSip);
|
||||
if(isNewContact) {
|
||||
tempNounoa = new NewOrUpdatedNumberOrAddress(isSip, numberOrAddress);
|
||||
} else {
|
||||
tempNounoa = new NewOrUpdatedNumberOrAddress(numberOrAddress, isSip);
|
||||
}
|
||||
}
|
||||
final NewOrUpdatedNumberOrAddress nounoa = tempNounoa;
|
||||
numbersAndAddresses.add(nounoa);
|
||||
|
@ -499,6 +504,12 @@ public class EditContactFragment extends Fragment {
|
|||
isSipAddress = isSip;
|
||||
}
|
||||
|
||||
public NewOrUpdatedNumberOrAddress(boolean isSip, String newSip) {
|
||||
oldNumberOrAddress = null;
|
||||
newNumberOrAddress = newSip;
|
||||
isSipAddress = isSip;
|
||||
}
|
||||
|
||||
public void setNewNumberOrAddress(String newN) {
|
||||
newNumberOrAddress = newN;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue