blob: 9aae4b2f6b44ac76217dde6f6528bcb17678591d [file] [log] [blame]
alisionfde875f2013-05-28 17:01:54 -04001/*
Alexandre Lisionc1024c02014-01-06 11:12:53 -05002 * Copyright (C) 2004-2014 Savoir-Faire Linux Inc.
alisionfde875f2013-05-28 17:01:54 -04003 *
4 * Author: Alexandre Lision <alexandre.lision@savoirfairelinux.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 *
20 * Additional permission under GNU GPL version 3 section 7:
21 *
22 * If you modify this program, or any covered work, by linking or
23 * combining it with the OpenSSL project's OpenSSL library (or a
24 * modified version of that library), containing parts covered by the
25 * terms of the OpenSSL or SSLeay licenses, Savoir-Faire Linux Inc.
26 * grants you additional permission to convey the resulting work.
27 * Corresponding Source for a non-source form of such a combination
28 * shall include the source code for the parts of OpenSSL used as well
29 * as that of the covered work.
30 */
Alexandre Lision064e1e02013-10-01 16:18:42 -040031package org.sflphone.fragments;
alisionfde875f2013-05-28 17:01:54 -040032
alisionfde875f2013-05-28 17:01:54 -040033import android.app.Activity;
alision465ceba2013-07-04 09:24:30 -040034import android.content.ClipData;
35import android.content.ClipData.Item;
alisionb1763882013-06-18 17:30:51 -040036import android.content.Context;
37import android.content.Intent;
Alexandre Lision183bf452014-01-17 11:21:59 -050038import android.content.IntentFilter;
alision465ceba2013-07-04 09:24:30 -040039import android.graphics.Color;
Alexandre Lision183bf452014-01-17 11:21:59 -050040import android.os.*;
Alexandre Lisionbe54c342014-01-21 17:10:33 -050041import android.support.v4.app.Fragment;
alisionfde875f2013-05-28 17:01:54 -040042import android.util.Log;
alision465ceba2013-07-04 09:24:30 -040043import android.view.DragEvent;
alisionfde875f2013-05-28 17:01:54 -040044import android.view.LayoutInflater;
45import android.view.View;
alision465ceba2013-07-04 09:24:30 -040046import android.view.View.DragShadowBuilder;
47import android.view.View.OnDragListener;
alisionfde875f2013-05-28 17:01:54 -040048import android.view.ViewGroup;
Alexandre Lision183bf452014-01-17 11:21:59 -050049import android.widget.*;
alision465ceba2013-07-04 09:24:30 -040050import android.widget.AdapterView.OnItemClickListener;
51import android.widget.AdapterView.OnItemLongClickListener;
Alexandre Lision183bf452014-01-17 11:21:59 -050052import org.sflphone.R;
53import org.sflphone.client.CallActivity;
54import org.sflphone.client.HomeActivity;
55import org.sflphone.interfaces.CallInterface;
56import org.sflphone.model.Conference;
57import org.sflphone.receivers.CallReceiver;
58import org.sflphone.service.CallManagerCallBack;
59import org.sflphone.service.ISipService;
alisionfde875f2013-05-28 17:01:54 -040060
Alexandre Lision183bf452014-01-17 11:21:59 -050061import java.util.ArrayList;
62import java.util.HashMap;
63import java.util.Observable;
64import java.util.Observer;
65
66public class CallListFragment extends Fragment implements CallInterface {
67
Alexandre Lisionf02190d2013-12-12 17:26:12 -050068 private static final String TAG = CallListFragment.class.getSimpleName();
alisionfde875f2013-05-28 17:01:54 -040069
70 private Callbacks mCallbacks = sDummyCallbacks;
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -050071 private TextView mConversationsTitleTextView;
72 CallListAdapter mConferenceAdapter;
73 CallReceiver mCallReceiver;
alisionfde875f2013-05-28 17:01:54 -040074
alision1005ba12013-06-19 13:52:44 -040075 public static final int REQUEST_TRANSFER = 10;
76 public static final int REQUEST_CONF = 20;
77
alisionfde875f2013-05-28 17:01:54 -040078 /**
79 * A dummy implementation of the {@link Callbacks} interface that does nothing. Used only when this fragment is not attached to an activity.
80 */
81 private static Callbacks sDummyCallbacks = new Callbacks() {
82
83 @Override
84 public ISipService getService() {
Alexandre Lisionf02190d2013-12-12 17:26:12 -050085 Log.i(TAG, "I'm a dummy");
alisionfde875f2013-05-28 17:01:54 -040086 return null;
87 }
alision85992112013-05-29 12:18:08 -040088
alisionfde875f2013-05-28 17:01:54 -040089 };
90
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -050091 @Override
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -050092 public void callStateChanged(Intent callState) {
93 Bundle b = callState.getBundleExtra("com.savoirfairelinux.sflphone.service.newstate");
94 String cID = b.getString("CallID");
95 String state = b.getString("State");
96 Log.i(TAG, "callStateChanged" + cID + " " + state);
Alexandre Lision183bf452014-01-17 11:21:59 -050097
98 updateLists();
99
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500100 }
101
102 @Override
103 public void incomingText(Intent msg) {
104 Bundle b = msg.getBundleExtra("com.savoirfairelinux.sflphone.service.newtext");
105 b.getString("CallID");
106 String from = b.getString("From");
107 String mess = b.getString("Msg");
108 Toast.makeText(getActivity(), "text from " + from + " : " + mess, Toast.LENGTH_LONG).show();
109 }
110
111 @Override
112 public void confCreated(Intent intent) {
Alexandre Lision183bf452014-01-17 11:21:59 -0500113 Log.i(TAG, "confCreated");
114 updateLists();
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500115 }
116
117 @Override
118 public void confRemoved(Intent intent) {
Alexandre Lision183bf452014-01-17 11:21:59 -0500119 Log.i(TAG, "confRemoved");
120 updateLists();
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500121 }
122
123 @Override
124 public void confChanged(Intent intent) {
Alexandre Lision183bf452014-01-17 11:21:59 -0500125 Log.i(TAG, "confChanged");
126 updateLists();
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500127 }
128
129 @Override
130 public void recordingChanged(Intent intent) {
131
132 }
133
alisionfde875f2013-05-28 17:01:54 -0400134 /**
135 * The Activity calling this fragment has to implement this interface
alisionfde875f2013-05-28 17:01:54 -0400136 */
137 public interface Callbacks {
138 public ISipService getService();
alisionfde875f2013-05-28 17:01:54 -0400139 }
140
141 @Override
142 public void onAttach(Activity activity) {
143 super.onAttach(activity);
144
145 if (!(activity instanceof Callbacks)) {
146 throw new IllegalStateException("Activity must implement fragment's callbacks.");
147 }
148
149 mCallbacks = (Callbacks) activity;
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500150
151 }
152
153 private Runnable mUpdateTimeTask = new Runnable() {
154 public void run() {
155 final long start = SystemClock.uptimeMillis();
156 long millis = SystemClock.uptimeMillis() - start;
157 int seconds = (int) (millis / 1000);
158 int minutes = seconds / 60;
159 seconds = seconds % 60;
160
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500161 mConferenceAdapter.notifyDataSetChanged();
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500162 mHandler.postAtTime(this, start + (((minutes * 60) + seconds + 1) * 1000));
163 }
164 };
165
166 private Handler mHandler = new Handler();
167
168 @Override
169 public void onResume() {
170 super.onResume();
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500171 IntentFilter intentFilter = new IntentFilter();
172 intentFilter.addAction(CallManagerCallBack.INCOMING_CALL);
173 intentFilter.addAction(CallManagerCallBack.INCOMING_TEXT);
174 intentFilter.addAction(CallManagerCallBack.CALL_STATE_CHANGED);
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500175 getActivity().registerReceiver(mCallReceiver, intentFilter);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500176 if (mCallbacks.getService() != null) {
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500177
Alexandre Lision183bf452014-01-17 11:21:59 -0500178 updateLists();
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500179 if (!mConferenceAdapter.isEmpty()) {
Alexandre Lision183bf452014-01-17 11:21:59 -0500180 mHandler.postDelayed(mUpdateTimeTask, 0);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500181 }
182 }
183
184 }
185
186 @SuppressWarnings("unchecked")
187 // No proper solution with HashMap runtime cast
Alexandre Lision183bf452014-01-17 11:21:59 -0500188 public void updateLists() {
Alexandre Lision183bf452014-01-17 11:21:59 -0500189 try {
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500190 HashMap<String, Conference> confs = (HashMap<String, Conference>) mCallbacks.getService().getConferenceList();
191 String newTitle = getResources().getQuantityString(R.plurals.home_conferences_title, confs.size(), confs.size());
192 mConversationsTitleTextView.setText(newTitle);
193 mConferenceAdapter.updateDataset(new ArrayList<Conference>(confs.values()));
Alexandre Lision183bf452014-01-17 11:21:59 -0500194 } catch (RemoteException e) {
195 e.printStackTrace();
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500196 }
alisionfde875f2013-05-28 17:01:54 -0400197 }
198
199 @Override
200 public void onDetach() {
201 super.onDetach();
202 mCallbacks = sDummyCallbacks;
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500203
alisionfde875f2013-05-28 17:01:54 -0400204 }
205
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500206 @Override
207 public void onCreate(Bundle savedInstanceState) {
208 super.onCreate(savedInstanceState);
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500209 mCallReceiver = new CallReceiver(this);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500210 }
211
212 @Override
213 public void onPause() {
214 super.onPause();
215 mHandler.removeCallbacks(mUpdateTimeTask);
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500216 getActivity().unregisterReceiver(mCallReceiver);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500217 }
218
219 @Override
220 public void onActivityCreated(Bundle savedInstanceState) {
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500221 super.onActivityCreated(savedInstanceState);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500222 }
alisionb1763882013-06-18 17:30:51 -0400223
alisionfde875f2013-05-28 17:01:54 -0400224 @Override
225 public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500226 Log.i(TAG, "onCreateView");
227 View inflatedView = inflater.inflate(R.layout.frag_call_list, container, false);
alisionfde875f2013-05-28 17:01:54 -0400228
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500229 mConversationsTitleTextView = (TextView) inflatedView.findViewById(R.id.confs_counter);
alisionb1763882013-06-18 17:30:51 -0400230
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500231 mConferenceAdapter = new CallListAdapter(getActivity());
232 ((ListView) inflatedView.findViewById(R.id.confs_list)).setAdapter(mConferenceAdapter);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500233 ((ListView) inflatedView.findViewById(R.id.confs_list)).setOnItemClickListener(callClickListener);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500234 ((ListView) inflatedView.findViewById(R.id.confs_list)).setOnItemLongClickListener(mItemLongClickListener);
235
236 return inflatedView;
237 }
238
239 OnItemClickListener callClickListener = new OnItemClickListener() {
240
241 @Override
242 public void onItemClick(AdapterView<?> arg0, View v, int arg2, long arg3) {
Alexandre Lision183bf452014-01-17 11:21:59 -0500243 Intent intent = new Intent().setClass(getActivity(), CallActivity.class);
244 intent.putExtra("resuming", true);
245 intent.putExtra("conference", (Conference) v.getTag());
246 startActivityForResult(intent, HomeActivity.REQUEST_CODE_CALL);
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500247 }
248 };
249
250 private OnItemLongClickListener mItemLongClickListener = new OnItemLongClickListener() {
251
252 @Override
253 public boolean onItemLongClick(AdapterView<?> adptv, View view, int pos, long arg3) {
254 final Vibrator vibe = (Vibrator) view.getContext().getSystemService(Context.VIBRATOR_SERVICE);
255 vibe.vibrate(80);
256 Intent i = new Intent();
257 Bundle b = new Bundle();
258 b.putParcelable("conference", (Conference) adptv.getAdapter().getItem(pos));
259 i.putExtra("bconference", b);
260
261 DragShadowBuilder shadowBuilder = new View.DragShadowBuilder(view);
262 ClipData data = ClipData.newIntent("conference", i);
263 view.startDrag(data, shadowBuilder, view, 0);
264 return false;
265 }
266
267 };
268
269 public class CallListAdapter extends BaseAdapter implements Observer {
270
271 private ArrayList<Conference> calls;
272
273 private Context mContext;
274
275 public CallListAdapter(Context act) {
276 super();
277 mContext = act;
278 calls = new ArrayList<Conference>();
279
280 }
281
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500282 public void updateDataset(ArrayList<Conference> list) {
283 calls.clear();
284 calls.addAll(list);
285 notifyDataSetChanged();
286 }
287
288 @Override
289 public int getCount() {
290 return calls.size();
291 }
292
293 @Override
294 public Conference getItem(int position) {
295 return calls.get(position);
296 }
297
298 @Override
299 public long getItemId(int position) {
300 return 0;
301 }
302
303 @Override
304 public View getView(int position, View convertView, ViewGroup parent) {
305 if (convertView == null)
306 convertView = LayoutInflater.from(mContext).inflate(R.layout.item_calllist, null);
307
308 Conference call = calls.get(position);
309 if (call.getParticipants().size() == 1) {
310 ((TextView) convertView.findViewById(R.id.call_title)).setText(call.getParticipants().get(0).getContact().getmDisplayName());
311
Alexandre Lision945e4612014-01-15 17:40:31 -0500312 long duration = System.currentTimeMillis() / 1000 - (call.getParticipants().get(0).getTimestampStart_());
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500313
314 ((TextView) convertView.findViewById(R.id.call_time)).setText(String.format("%d:%02d:%02d", duration / 3600, (duration % 3600) / 60,
315 (duration % 60)));
316 } else {
317// String tmp = "Conference with " + call.getParticipants().size() + " participants";
318 ((TextView) convertView.findViewById(R.id.call_title)).setText(getString(R.string.home_conf_item, call.getParticipants().size()));
319 }
320 // ((TextView) convertView.findViewById(R.id.num_participants)).setText("" + call.getParticipants().size());
321 ((TextView) convertView.findViewById(R.id.call_status)).setText(call.getState());
322
323 convertView.setOnDragListener(dragListener);
324 convertView.setTag(call);
325
326 return convertView;
327 }
328
329 @Override
330 public void update(Observable observable, Object data) {
331 Log.i(TAG, "Updating views...");
332 notifyDataSetChanged();
333 }
334
alisionfde875f2013-05-28 17:01:54 -0400335 }
336
alision465ceba2013-07-04 09:24:30 -0400337 OnDragListener dragListener = new OnDragListener() {
338
Alexandre Lisionf02190d2013-12-12 17:26:12 -0500339 @SuppressWarnings("deprecation")
340 // deprecated in API 16....
alision465ceba2013-07-04 09:24:30 -0400341 @Override
342 public boolean onDrag(View v, DragEvent event) {
343 switch (event.getAction()) {
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500344 case DragEvent.ACTION_DRAG_STARTED:
345 // Do nothing
346 // Log.w(TAG, "ACTION_DRAG_STARTED");
347 break;
348 case DragEvent.ACTION_DRAG_ENTERED:
349 // Log.w(TAG, "ACTION_DRAG_ENTERED");
350 v.setBackgroundColor(Color.GREEN);
351 break;
352 case DragEvent.ACTION_DRAG_EXITED:
353 // Log.w(TAG, "ACTION_DRAG_EXITED");
354 v.setBackgroundDrawable(getResources().getDrawable(R.drawable.item_generic_selector));
355 break;
356 case DragEvent.ACTION_DROP:
357 // Log.w(TAG, "ACTION_DROP");
358 View view = (View) event.getLocalState();
alision465ceba2013-07-04 09:24:30 -0400359
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500360 Item i = event.getClipData().getItemAt(0);
361 Intent intent = i.getIntent();
362 intent.setExtrasClassLoader(Conference.class.getClassLoader());
alision465ceba2013-07-04 09:24:30 -0400363
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500364 Conference initial = (Conference) view.getTag();
365 Conference target = (Conference) v.getTag();
alisionf2ae4362013-07-05 16:16:12 -0400366
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500367 if (initial == target) {
368 return true;
369 }
alision465ceba2013-07-04 09:24:30 -0400370
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500371 DropActionsChoice dialog = DropActionsChoice.newInstance();
372 Bundle b = new Bundle();
373 b.putParcelable("call_initial", initial);
374 b.putParcelable("call_targeted", target);
375 dialog.setArguments(b);
376 dialog.setTargetFragment(CallListFragment.this, 0);
Alexandre Lisionf9885fb2014-01-21 11:57:51 -0500377 dialog.show(getFragmentManager(), "dialog");
alision465ceba2013-07-04 09:24:30 -0400378
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500379 // view.setBackgroundColor(Color.WHITE);
380 // v.setBackgroundColor(Color.BLACK);
381 break;
382 case DragEvent.ACTION_DRAG_ENDED:
383 // Log.w(TAG, "ACTION_DRAG_ENDED");
384 View view1 = (View) event.getLocalState();
385 view1.setVisibility(View.VISIBLE);
386 v.setBackgroundDrawable(getResources().getDrawable(R.drawable.item_generic_selector));
387 default:
388 break;
alision465ceba2013-07-04 09:24:30 -0400389 }
390 return true;
391 }
392
393 };
394
alisionb1763882013-06-18 17:30:51 -0400395 @Override
396 public void onActivityResult(int requestCode, int resultCode, Intent data) {
397 super.onActivityResult(requestCode, resultCode, data);
Alexandre Lision183bf452014-01-17 11:21:59 -0500398 Conference transfer;
alision1005ba12013-06-19 13:52:44 -0400399 if (requestCode == REQUEST_TRANSFER) {
400 switch (resultCode) {
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500401 case 0:
402 Conference c = data.getParcelableExtra("target");
403 transfer = data.getParcelableExtra("transfer");
404 try {
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500405 mCallbacks.getService().attendedTransfer(transfer.getParticipants().get(0).getCallId(), c.getParticipants().get(0).getCallId());
Alexandre Lisioncd6a82d2014-01-17 12:10:23 -0500406 mConferenceAdapter.notifyDataSetChanged();
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500407 } catch (RemoteException e) {
408 // TODO Auto-generated catch block
409 e.printStackTrace();
410 }
411 Toast.makeText(getActivity(), getString(R.string.home_transfer_complet), Toast.LENGTH_LONG).show();
412 break;
alision1005ba12013-06-19 13:52:44 -0400413
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500414 case 1:
415 String to = data.getStringExtra("to_number");
416 transfer = data.getParcelableExtra("transfer");
417 try {
418 Toast.makeText(getActivity(), getString(R.string.home_transfering, transfer.getParticipants().get(0).getContact().getmDisplayName(), to),
419 Toast.LENGTH_SHORT).show();
420 mCallbacks.getService().transfer(transfer.getParticipants().get(0).getCallId(), to);
421 mCallbacks.getService().hangUp(transfer.getParticipants().get(0).getCallId());
422 } catch (RemoteException e) {
423 // TODO Auto-generated catch block
424 e.printStackTrace();
425 }
426 break;
alision1005ba12013-06-19 13:52:44 -0400427
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500428 default:
429 break;
alisionb1763882013-06-18 17:30:51 -0400430 }
alision907bde72013-06-20 14:40:37 -0400431 } else if (requestCode == REQUEST_CONF) {
alision1005ba12013-06-19 13:52:44 -0400432 switch (resultCode) {
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500433 case 0:
434 Conference call_to_add = data.getParcelableExtra("transfer");
435 Conference call_target = data.getParcelableExtra("target");
alision1005ba12013-06-19 13:52:44 -0400436
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500437 bindCalls(call_to_add, call_target);
438 break;
alision1005ba12013-06-19 13:52:44 -0400439
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500440 default:
441 break;
alision1005ba12013-06-19 13:52:44 -0400442 }
alisionb1763882013-06-18 17:30:51 -0400443 }
444 }
445
alision465ceba2013-07-04 09:24:30 -0400446 private void bindCalls(Conference call_to_add, Conference call_target) {
447 try {
448
Alexandre Lision183bf452014-01-17 11:21:59 -0500449 Log.i(TAG, "joining calls:" + call_to_add.getId() + " and " + call_target.getId());
Alexandre Lisiona9ee4eb2014-01-15 16:20:35 -0500450
alision465ceba2013-07-04 09:24:30 -0400451 if (call_target.hasMultipleParticipants() && !call_to_add.hasMultipleParticipants()) {
452
453 mCallbacks.getService().addParticipant(call_to_add.getParticipants().get(0), call_target.getId());
454
455 } else if (call_target.hasMultipleParticipants() && call_to_add.hasMultipleParticipants()) {
456
457 // We join two conferences
458 mCallbacks.getService().joinConference(call_to_add.getId(), call_target.getId());
459
460 } else if (!call_target.hasMultipleParticipants() && call_to_add.hasMultipleParticipants()) {
461
462 mCallbacks.getService().addParticipant(call_target.getParticipants().get(0), call_to_add.getId());
463
464 } else {
465 // We join two single calls to create a conf
466 mCallbacks.getService().joinParticipant(call_to_add.getParticipants().get(0).getCallId(),
467 call_target.getParticipants().get(0).getCallId());
468 }
469
470 } catch (RemoteException e) {
471 // TODO Auto-generated catch block
472 e.printStackTrace();
473 }
474 }
475
alisionfde875f2013-05-28 17:01:54 -0400476}