Fix call transfer
This commit is contained in:
parent
36e361dc8d
commit
83c32db784
2 changed files with 14 additions and 5 deletions
|
@ -122,6 +122,8 @@ public class DialerFragment extends Fragment {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
instance = this;
|
||||||
|
|
||||||
return view;
|
return view;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +168,7 @@ public class DialerFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetLayout(boolean callTransfer) {
|
public void resetLayout(boolean callTransfer) {
|
||||||
isCallTransferOngoing = callTransfer;
|
isCallTransferOngoing = LinphoneActivity.instance().isCallTransfer();
|
||||||
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
if (lc == null) {
|
if (lc == null) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -133,6 +133,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
private ImageView menu;
|
private ImageView menu;
|
||||||
private boolean fetchedContactsOnce = false;
|
private boolean fetchedContactsOnce = false;
|
||||||
private boolean doNotGoToCallActivity = false;
|
private boolean doNotGoToCallActivity = false;
|
||||||
|
private boolean callTransfer = false;
|
||||||
|
|
||||||
static final boolean isInstanciated() {
|
static final boolean isInstanciated() {
|
||||||
return instance != null;
|
return instance != null;
|
||||||
|
@ -998,7 +999,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initInCallMenuLayout(boolean callTransfer) {
|
public Boolean isCallTransfer(){
|
||||||
|
return callTransfer;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initInCallMenuLayout(final boolean callTransfer) {
|
||||||
selectMenu(FragmentsAvailable.DIALER);
|
selectMenu(FragmentsAvailable.DIALER);
|
||||||
DialerFragment dialerFragment = DialerFragment.instance();
|
DialerFragment dialerFragment = DialerFragment.instance();
|
||||||
if (dialerFragment != null) {
|
if (dialerFragment != null) {
|
||||||
|
@ -1009,7 +1014,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
public void resetClassicMenuLayoutAndGoBackToCallIfStillRunning() {
|
public void resetClassicMenuLayoutAndGoBackToCallIfStillRunning() {
|
||||||
DialerFragment dialerFragment = DialerFragment.instance();
|
DialerFragment dialerFragment = DialerFragment.instance();
|
||||||
if (dialerFragment != null) {
|
if (dialerFragment != null) {
|
||||||
((DialerFragment) dialerFragment).resetLayout(false);
|
((DialerFragment) dialerFragment).resetLayout(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LinphoneManager.isInstanciated() && LinphoneManager.getLc().getCallsNb() > 0) {
|
if (LinphoneManager.isInstanciated() && LinphoneManager.getLc().getCallsNb() > 0) {
|
||||||
|
@ -1073,7 +1078,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
}
|
}
|
||||||
} else if (resultCode == Activity.RESULT_FIRST_USER && requestCode == CALL_ACTIVITY) {
|
} else if (resultCode == Activity.RESULT_FIRST_USER && requestCode == CALL_ACTIVITY) {
|
||||||
getIntent().putExtra("PreviousActivity", CALL_ACTIVITY);
|
getIntent().putExtra("PreviousActivity", CALL_ACTIVITY);
|
||||||
boolean callTransfer = data == null ? false : data.getBooleanExtra("Transfer", false);
|
callTransfer = data == null ? false : data.getBooleanExtra("Transfer", false);
|
||||||
boolean chat = data == null ? false : data.getBooleanExtra("chat", false);
|
boolean chat = data == null ? false : data.getBooleanExtra("chat", false);
|
||||||
if(chat){
|
if(chat){
|
||||||
pendingFragmentTransaction = FragmentsAvailable.CHAT_LIST;
|
pendingFragmentTransaction = FragmentsAvailable.CHAT_LIST;
|
||||||
|
@ -1104,6 +1109,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
|
||||||
lc.removeListener(mListener);
|
lc.removeListener(mListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
callTransfer = false;
|
||||||
|
|
||||||
super.onPause();
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue