Skip to content
Snippets Groups Projects
Commit 6ae652de authored by Alexandre Lision's avatar Alexandre Lision
Browse files

* #30525: bility to make attended transfer during call

parent 50d5630d
Branches
Tags
No related merge requests found
......@@ -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>());
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
......
......@@ -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;
}
}
......
......@@ -427,4 +427,9 @@ public class SipCall implements Parcelable {
return mCallState == state.CALL_STATE_HOLD;
}
public boolean isCurrent() {
return mCallState == state.CALL_STATE_CURRENT;
}
}
......@@ -67,6 +67,7 @@ interface ISipService {
String getConferenceDetails(in String callID);
Conference getCurrentCall();
List getConcurrentCalls();
/* */
......
......@@ -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;
}
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment