diff --git a/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java b/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java index 4486828b6167c8206c7e72025072385bf1e23e6b..33981f540dcd70f88287bb4b225f0f9c7d975e7e 100644 --- a/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java +++ b/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java @@ -466,13 +466,17 @@ public class CallFragment extends Fragment implements Callback, SensorEventListe 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 2a03ce8e5104a15b9624f1541c0493ea10e4a4f0..6184d2387bf87614a248612c788e9f3dd09fda4d 100644 --- a/src/com/savoirfairelinux/sflphone/model/BubblesView.java +++ b/src/com/savoirfairelinux/sflphone/model/BubblesView.java @@ -466,7 +466,6 @@ public class BubblesView extends SurfaceView implements SurfaceHolder.Callback, 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 ec2fddb0a23f5d42baca534900248108d7e1beb7..7fa44db39be30380706892dd4f122c086dc2eb2a 100644 --- a/src/com/savoirfairelinux/sflphone/model/SipCall.java +++ b/src/com/savoirfairelinux/sflphone/model/SipCall.java @@ -427,4 +427,9 @@ public class SipCall implements Parcelable { 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 75cfcdb6b0997c7a296f5e08833c61e12565b693..54834f55ce83575c7ef798336cb3f15ca575f6f3 100644 --- a/src/com/savoirfairelinux/sflphone/service/ISipService.aidl +++ b/src/com/savoirfairelinux/sflphone/service/ISipService.aidl @@ -67,6 +67,7 @@ interface ISipService { 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 eccd684a18e1227c01ab5a51deea7bfd6151298b..1ec06b34068ef9f02142d64e676984e0bdfe80dd 100644 --- a/src/com/savoirfairelinux/sflphone/service/SipService.java +++ b/src/com/savoirfairelinux/sflphone/service/SipService.java @@ -1160,5 +1160,22 @@ public class SipService extends Service { }); } + @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; + } + }; }