* #30525: bility to make attended transfer during call
diff --git a/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java b/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java
index 4486828..33981f5 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java
@@ -466,13 +466,17 @@
public void makeTransfer(Bubble contact) {
FragmentManager fm = getFragmentManager();
TransferDFragment editName = new TransferDFragment();
-
Bundle b = new Bundle();
- b.putParcelableArrayList("calls", new ArrayList<Conference>());
- b.putParcelable("call_selected", contact.associated_call);
- editName.setArguments(b);
- editName.setTargetFragment(this, REQUEST_TRANSFER);
- editName.show(fm, "");
+ try {
+ b.putParcelableArrayList("calls", (ArrayList<Conference>)mCallbacks.getService().getConcurrentCalls());
+ b.putParcelable("call_selected", contact.associated_call);
+ editName.setArguments(b);
+ editName.setTargetFragment(this, REQUEST_TRANSFER);
+ editName.show(fm, "");
+ } catch (RemoteException e) {
+ Log.e(TAG, e.toString());
+ }
+
}
@Override
diff --git a/src/com/savoirfairelinux/sflphone/model/BubblesView.java b/src/com/savoirfairelinux/sflphone/model/BubblesView.java
index 2a03ce8..6184d23 100644
--- a/src/com/savoirfairelinux/sflphone/model/BubblesView.java
+++ b/src/com/savoirfairelinux/sflphone/model/BubblesView.java
@@ -466,7 +466,6 @@
break;
case 3:
callback.makeTransfer(expand);
- Toast.makeText(getContext(), "Not implemented here", Toast.LENGTH_SHORT).show();
break;
}
}
diff --git a/src/com/savoirfairelinux/sflphone/model/SipCall.java b/src/com/savoirfairelinux/sflphone/model/SipCall.java
index ec2fddb..7fa44db 100644
--- a/src/com/savoirfairelinux/sflphone/model/SipCall.java
+++ b/src/com/savoirfairelinux/sflphone/model/SipCall.java
@@ -427,4 +427,9 @@
return mCallState == state.CALL_STATE_HOLD;
}
+
+ public boolean isCurrent() {
+ return mCallState == state.CALL_STATE_CURRENT;
+ }
+
}
diff --git a/src/com/savoirfairelinux/sflphone/service/ISipService.aidl b/src/com/savoirfairelinux/sflphone/service/ISipService.aidl
index 75cfcdb..54834f5 100644
--- a/src/com/savoirfairelinux/sflphone/service/ISipService.aidl
+++ b/src/com/savoirfairelinux/sflphone/service/ISipService.aidl
@@ -67,6 +67,7 @@
String getConferenceDetails(in String callID);
Conference getCurrentCall();
+ List getConcurrentCalls();
/* */
diff --git a/src/com/savoirfairelinux/sflphone/service/SipService.java b/src/com/savoirfairelinux/sflphone/service/SipService.java
index eccd684..1ec06b3 100644
--- a/src/com/savoirfairelinux/sflphone/service/SipService.java
+++ b/src/com/savoirfairelinux/sflphone/service/SipService.java
@@ -1160,5 +1160,22 @@
});
}
+ @Override
+ public List getConcurrentCalls() throws RemoteException {
+ ArrayList<Conference> toReturn = new ArrayList<Conference>();
+
+ for(SipCall sip : current_calls.values()){
+ if(!sip.isCurrent()){
+ Conference tmp = new Conference("-1");
+ tmp.getParticipants().add(sip);
+ toReturn.add(tmp);
+ }
+ }
+
+ Log.i(TAG,"toReturn SIZE "+ toReturn.size());
+
+ return toReturn;
+ }
+
};
}