Fixed add contact button on dialer not disabled
This commit is contained in:
parent
5e04f0b86d
commit
217db2f175
1 changed files with 3 additions and 3 deletions
|
@ -259,9 +259,7 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onAddressChanged() {
|
public void onAddressChanged() {
|
||||||
Core core = LinphoneManager.getCore();
|
mAddContact.setEnabled(!mAddress.getText().toString().isEmpty());
|
||||||
mAddContact.setEnabled(
|
|
||||||
core != null && core.getCallsNb() > 0 || !mAddress.getText().toString().equals(""));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateLayout() {
|
private void updateLayout() {
|
||||||
|
@ -273,6 +271,8 @@ public class DialerActivity extends MainActivity implements AddressText.AddressC
|
||||||
boolean atLeastOneCall = core.getCallsNb() > 0;
|
boolean atLeastOneCall = core.getCallsNb() > 0;
|
||||||
mStartCall.setVisibility(atLeastOneCall ? View.GONE : View.VISIBLE);
|
mStartCall.setVisibility(atLeastOneCall ? View.GONE : View.VISIBLE);
|
||||||
mAddContact.setVisibility(atLeastOneCall ? View.GONE : View.VISIBLE);
|
mAddContact.setVisibility(atLeastOneCall ? View.GONE : View.VISIBLE);
|
||||||
|
mAddContact.setEnabled(!mAddress.getText().toString().isEmpty());
|
||||||
|
|
||||||
if (!atLeastOneCall) {
|
if (!atLeastOneCall) {
|
||||||
if (core.getVideoActivationPolicy().getAutomaticallyInitiate()) {
|
if (core.getVideoActivationPolicy().getAutomaticallyInitiate()) {
|
||||||
mStartCall.setImageResource(R.drawable.call_video_start);
|
mStartCall.setImageResource(R.drawable.call_video_start);
|
||||||
|
|
Loading…
Reference in a new issue