* #26145 Thread was locking UI
* #26115 Unattended transfer working
diff --git a/src/com/savoirfairelinux/sflphone/adapters/ContactsAdapter.java b/src/com/savoirfairelinux/sflphone/adapters/ContactsAdapter.java
index 2f4f9f8..f84ce07 100644
--- a/src/com/savoirfairelinux/sflphone/adapters/ContactsAdapter.java
+++ b/src/com/savoirfairelinux/sflphone/adapters/ContactsAdapter.java
@@ -1,18 +1,10 @@
package com.savoirfairelinux.sflphone.adapters;
-import java.io.InputStream;
import java.util.ArrayList;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
-import android.content.ContentResolver;
-import android.content.ContentUris;
import android.content.Context;
-import android.database.Cursor;
-import android.graphics.Bitmap;
-import android.graphics.BitmapFactory;
-import android.net.Uri;
-import android.provider.ContactsContract;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
diff --git a/src/com/savoirfairelinux/sflphone/client/CallActivity.java b/src/com/savoirfairelinux/sflphone/client/CallActivity.java
index 30e7066..6147e57 100644
--- a/src/com/savoirfairelinux/sflphone/client/CallActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/CallActivity.java
@@ -54,7 +54,7 @@
import android.widget.Toast;
import com.savoirfairelinux.sflphone.R;
-import com.savoirfairelinux.sflphone.fragments.CallActionsDFragment;
+import com.savoirfairelinux.sflphone.fragments.TransferDFragment;
import com.savoirfairelinux.sflphone.fragments.CallFragment;
import com.savoirfairelinux.sflphone.fragments.CallListFragment;
import com.savoirfairelinux.sflphone.interfaces.CallInterface;
@@ -189,6 +189,7 @@
.setAccountID(service.getAccountList().get(1).toString()).setCallType(SipCall.state.CALL_TYPE_OUTGOING).build();
Bundle b = new Bundle();
b.putParcelable("CallInfo", call);
+ Log.i(TAG, "Arguments set");
mCurrentCallFragment.setArguments(b);
} catch (RemoteException e) {
// TODO Auto-generated catch block
@@ -245,6 +246,7 @@
try {
map = (HashMap<String, SipCall>) service.getCallList();
if (map.size() == 0) {
+
finish();
}
} catch (RemoteException e) {
diff --git a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
index d364aab..816e4ed 100644
--- a/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
+++ b/src/com/savoirfairelinux/sflphone/client/SFLPhoneHomeActivity.java
@@ -431,7 +431,7 @@
break;
case REQUEST_CODE_CALL:
Log.w(TAG, "Result out of CallActivity");
-
+
break;
}
diff --git a/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java b/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java
index 124e806..90342d5 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/CallFragment.java
@@ -60,324 +60,333 @@
public class CallFragment extends Fragment implements Callback {
- static final String TAG = "CallFragment";
+ static final String TAG = "CallFragment";
- static final float BUBBLE_SIZE = 75;
- static final float ATTRACTOR_SIZE = 40;
+ static final float BUBBLE_SIZE = 75;
+ static final float ATTRACTOR_SIZE = 40;
- private SipCall mCall;
+ private SipCall mCall;
- private TextView callStatusTxt;
- private BubblesView view;
- private BubbleModel model;
+ private TextView callStatusTxt;
+ private BubblesView view;
+ private BubbleModel model;
- private Callbacks mCallbacks = sDummyCallbacks;
+ private Callbacks mCallbacks = sDummyCallbacks;
- private HashMap<CallContact, Bubble> contacts = new HashMap<CallContact, Bubble>();
+ private HashMap<CallContact, Bubble> contacts = new HashMap<CallContact, Bubble>();
- private CallContact myself;
+ private CallContact myself;
- private Bitmap hangup_icon;
- private Bitmap call_icon;
+ private Bitmap hangup_icon;
+ private Bitmap call_icon;
- @Override
- public void onCreate(Bundle savedBundle) {
- super.onCreate(savedBundle);
- model = new BubbleModel(getResources().getDisplayMetrics().density);
- //metrics = getResources().getDisplayMetrics();
- //screenCenter = new PointF(metrics.widthPixels / 2, metrics.heightPixels / 3);
+ @Override
+ public void onCreate(Bundle savedBundle) {
+ super.onCreate(savedBundle);
+ model = new BubbleModel(getResources().getDisplayMetrics().density);
+ Bundle b = getArguments();
- Bundle b = getArguments();
+ mCall = b.getParcelable("CallInfo");
- mCall = b.getParcelable("CallInfo");
- //mCall.
- }
+ }
- /**
- * A dummy implementation of the {@link Callbacks} interface that does nothing. Used only when this fragment is not attached to an activity.
- */
- private static Callbacks sDummyCallbacks = new Callbacks() {
- @Override
- public void onSendMessage(SipCall call, String msg) {
- }
+ /**
+ * A dummy implementation of the {@link Callbacks} interface that does nothing. Used only when this fragment is not attached to an activity.
+ */
+ private static Callbacks sDummyCallbacks = new Callbacks() {
+ @Override
+ public void onSendMessage(SipCall call, String msg) {
+ }
- @Override
- public void callContact(SipCall call) {
- }
+ @Override
+ public void callContact(SipCall call) {
+ }
- @Override
- public void onCallAccepted(SipCall call) {
- }
+ @Override
+ public void onCallAccepted(SipCall call) {
+ }
- @Override
- public void onCallRejected(SipCall call) {
- }
+ @Override
+ public void onCallRejected(SipCall call) {
+ }
- @Override
- public void onCallEnded(SipCall call) {
- }
+ @Override
+ public void onCallEnded(SipCall call) {
+ }
- @Override
- public void onCallSuspended(SipCall call) {
- }
+ @Override
+ public void onCallSuspended(SipCall call) {
+ }
- @Override
- public void onCallResumed(SipCall call) {
- }
+ @Override
+ public void onCallResumed(SipCall call) {
+ }
- @Override
- public void onCalltransfered(SipCall call, String to) {
- }
+ @Override
+ public void onCalltransfered(SipCall call, String to) {
+ }
- @Override
- public void onRecordCall(SipCall call) {
- }
+ @Override
+ public void onRecordCall(SipCall call) {
+ }
- @Override
- public ISipService getService() {
- return null;
- }
- };
+ @Override
+ public ISipService getService() {
+ return null;
+ }
+ };
+
+ /**
+ * The Activity calling this fragment has to implement this interface
+ *
+ */
+ public interface Callbacks {
- /**
- * The Activity calling this fragment has to implement this interface
- *
- */
- public interface Callbacks {
+ public ISipService getService();
- public ISipService getService();
+ public void callContact(SipCall call);
- public void callContact(SipCall call);
+ public void onCallAccepted(SipCall call);
- public void onCallAccepted(SipCall call);
+ public void onCallRejected(SipCall call);
- public void onCallRejected(SipCall call);
+ public void onCallEnded(SipCall call);
- public void onCallEnded(SipCall call);
+ public void onCallSuspended(SipCall call);
- public void onCallSuspended(SipCall call);
+ public void onCallResumed(SipCall call);
- public void onCallResumed(SipCall call);
+ public void onCalltransfered(SipCall call, String to);
- public void onCalltransfered(SipCall call, String to);
+ public void onRecordCall(SipCall call);
- public void onRecordCall(SipCall call);
+ public void onSendMessage(SipCall call, String msg);
+ }
- public void onSendMessage(SipCall call, String msg);
- }
+ @Override
+ public void onAttach(Activity activity) {
+ super.onAttach(activity);
- @Override
- public void onAttach(Activity activity) {
- super.onAttach(activity);
+ if (!(activity instanceof Callbacks)) {
+ throw new IllegalStateException("Activity must implement fragment's callbacks.");
+ }
- if (!(activity instanceof Callbacks)) {
- throw new IllegalStateException("Activity must implement fragment's callbacks.");
- }
+ // rootView.requestDisallowInterceptTouchEvent(true);
- //rootView.requestDisallowInterceptTouchEvent(true);
+ mCallbacks = (Callbacks) activity;
+ myself = CallContact.ContactBuilder.buildUserContact(activity.getContentResolver(), "");
- mCallbacks = (Callbacks) activity;
- myself = CallContact.ContactBuilder.buildUserContact(activity.getContentResolver(), "");
-
- }
+ }
- @Override
- public void onDetach() {
- super.onDetach();
- mCallbacks = sDummyCallbacks;
- //rootView.requestDisallowInterceptTouchEvent(false);
- }
+ @Override
+ public void onDetach() {
+ super.onDetach();
+ mCallbacks = sDummyCallbacks;
+ // rootView.requestDisallowInterceptTouchEvent(false);
+ }
+
+ @Override
+ public void onStop(){
+ super.onStop();
+ }
- @Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
- ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.frag_call, container, false);
+ @Override
+ public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
+ ViewGroup rootView = (ViewGroup) inflater.inflate(R.layout.frag_call, container, false);
- view = (BubblesView) rootView.findViewById(R.id.main_view);
- view.setModel(model);
- view.getHolder().addCallback(this);
+ view = (BubblesView) rootView.findViewById(R.id.main_view);
+ view.setModel(model);
+ view.getHolder().addCallback(this);
- callStatusTxt = (TextView) rootView.findViewById(R.id.call_status_txt);
+ callStatusTxt = (TextView) rootView.findViewById(R.id.call_status_txt);
- hangup_icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_hangup);
- call_icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_call);
+ hangup_icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_hangup);
+ call_icon = BitmapFactory.decodeResource(getResources(), R.drawable.ic_call);
- // Do nothing here, the view is not initialized yet.
- return rootView;
- }
+ // Do nothing here, the view is not initialized yet.
+ return rootView;
+ }
- private void initNormalStateDisplay() {
- Log.i(TAG, "Start normal display");
+ private void initNormalStateDisplay() {
+ Log.i(TAG, "Start normal display");
- callStatusTxt.setText("0 min");
+ callStatusTxt.setText("0 min");
- getBubbleFor(mCall.getContacts().get(0), model.width/2, model.height/3);
- getBubbleFor(myself, model.width/2, model.height/2);
+ int radiusCalls = model.width / 2 - 150;
+ int angle_part = 360 / mCall.getContacts().size();
+ double dX = 0;
+ double dY = 0;
- model.clearAttractors();
- model.addAttractor(new Attractor(new PointF(model.width / 2, model.height * .8f), ATTRACTOR_SIZE, new Attractor.Callback() {
- @Override
- public boolean onBubbleSucked(Bubble b) {
- Log.w(TAG, "Bubble sucked ! ");
- mCallbacks.onCallEnded(mCall);
- bubbleRemoved(b);
- return true;
- }
- }, hangup_icon));
+ getBubbleFor(myself, model.width / 2, model.height / 2);
+ for (int i = 0; i < mCall.getContacts().size(); ++i) {
+ dX = Math.cos(Math.toRadians(angle_part * i)) * radiusCalls;
+ dY = Math.sin(Math.toRadians(angle_part * i)) * radiusCalls;
+
+ getBubbleFor(mCall.getContacts().get(i),(int) (model.width / 2 + dX), (int) (model.height / 2 + dY));
+ }
+
+ model.clearAttractors();
+ model.addAttractor(new Attractor(new PointF(model.width / 2, model.height * .8f), ATTRACTOR_SIZE, new Attractor.Callback() {
+ @Override
+ public boolean onBubbleSucked(Bubble b) {
+ Log.w(TAG, "Bubble sucked ! ");
+ mCallbacks.onCallEnded(mCall);
+ bubbleRemoved(b);
+ return true;
+ }
+ }, hangup_icon));
- }
+ }
- private void initIncomingCallDisplay() {
- Log.i(TAG, "Start incoming display");
+ private void initIncomingCallDisplay() {
+ Log.i(TAG, "Start incoming display");
- callStatusTxt.setText("Incomming call");
+ callStatusTxt.setText("Incomming call");
- Bubble contact_bubble = getBubbleFor(mCall.getContacts().get(0), model.width/2, model.height/2);
- contacts.put(mCall.getContacts().get(0), contact_bubble);
+ Bubble contact_bubble = getBubbleFor(mCall.getContacts().get(0), model.width / 2, model.height / 2);
+ contacts.put(mCall.getContacts().get(0), contact_bubble);
- model.clearAttractors();
- model.addAttractor(new Attractor(new PointF(4 * model.width / 5, model.height / 2), ATTRACTOR_SIZE, new Attractor.Callback() {
- @Override
- public boolean onBubbleSucked(Bubble b) {
- mCallbacks.onCallAccepted(mCall);
- return false;
- }
- }, call_icon));
- model.addAttractor(new Attractor(new PointF(model.width / 5, model.height / 2), ATTRACTOR_SIZE, new Attractor.Callback() {
- @Override
- public boolean onBubbleSucked(Bubble b) {
- mCallbacks.onCallRejected(mCall);
- bubbleRemoved(b);
- return true;
- }
- }, hangup_icon));
- }
+ model.clearAttractors();
+ model.addAttractor(new Attractor(new PointF(4 * model.width / 5, model.height / 2), ATTRACTOR_SIZE, new Attractor.Callback() {
+ @Override
+ public boolean onBubbleSucked(Bubble b) {
+ mCallbacks.onCallAccepted(mCall);
+ return false;
+ }
+ }, call_icon));
+ model.addAttractor(new Attractor(new PointF(model.width / 5, model.height / 2), ATTRACTOR_SIZE, new Attractor.Callback() {
+ @Override
+ public boolean onBubbleSucked(Bubble b) {
+ mCallbacks.onCallRejected(mCall);
+ bubbleRemoved(b);
+ return true;
+ }
+ }, hangup_icon));
+ }
- private void initOutGoingCallDisplay() {
- Log.i(TAG, "Start outgoing display");
+ private void initOutGoingCallDisplay() {
+ Log.i(TAG, "Start outgoing display");
- callStatusTxt.setText("Calling...");
+ callStatusTxt.setText("Calling...");
- // TODO off-thread image loading
- getBubbleFor(mCall.getContacts().get(0), model.width/2, model.height/3);
- getBubbleFor(myself, model.width/2, model.height/2);
+ // TODO off-thread image loading
+ getBubbleFor(mCall.getContacts().get(0), model.width / 2, model.height / 3);
+ getBubbleFor(myself, model.width / 2, model.height / 2);
- model.clearAttractors();
- model.addAttractor(new Attractor(new PointF(model.width / 2, model.height * .8f), 40, new Attractor.Callback() {
- @Override
- public boolean onBubbleSucked(Bubble b) {
- Log.w(TAG, "Bubble sucked ! ");
- mCallbacks.onCallEnded(mCall);
- bubbleRemoved(b);
- return true;
- }
- }, hangup_icon));
- }
+ model.clearAttractors();
+ model.addAttractor(new Attractor(new PointF(model.width / 2, model.height * .8f), 40, new Attractor.Callback() {
+ @Override
+ public boolean onBubbleSucked(Bubble b) {
+ Log.w(TAG, "Bubble sucked ! ");
+ mCallbacks.onCallEnded(mCall);
+ bubbleRemoved(b);
+ return true;
+ }
+ }, hangup_icon));
+ }
- /**
- * Retrieves or create a bubble for a given contact.
- * If the bubble exists, it is moved to the new location.
- *
- * @param contact The contact
- * @param x Initial or new x position.
- * @param y Initial or new y position.
- * @return Bubble corresponding to the contact.
- */
- private Bubble getBubbleFor(CallContact contact, float x, float y) {
- Bubble contact_bubble = contacts.get(contact);
- if(contact_bubble != null) {
- contact_bubble.attractor.set(x, y);
- return contact_bubble;
- }
+ /**
+ * Retrieves or create a bubble for a given contact. If the bubble exists, it is moved to the new location.
+ *
+ * @param contact
+ * The contact
+ * @param x
+ * Initial or new x position.
+ * @param y
+ * Initial or new y position.
+ * @return Bubble corresponding to the contact.
+ */
+ private Bubble getBubbleFor(CallContact contact, float x, float y) {
+ Bubble contact_bubble = contacts.get(contact);
+ if (contact_bubble != null) {
+ contact_bubble.attractor.set(x, y);
+ return contact_bubble;
+ }
- // TODO off-thread image loading
- if (contact.getPhoto_id() > 0) {
- Bitmap photo = ContactPictureLoader.loadContactPhoto(getActivity().getContentResolver(), contact.getId());
- contact_bubble = new Bubble(x, y, BUBBLE_SIZE, photo);
- } else {
- contact_bubble = new Bubble(x, y, BUBBLE_SIZE, getActivity(), R.drawable.ic_contact_picture);
- }
- contact_bubble.contact = contact;
+ // TODO off-thread image loading
+ if (contact.getPhoto_id() > 0) {
+ Bitmap photo = ContactPictureLoader.loadContactPhoto(getActivity().getContentResolver(), contact.getId());
+ contact_bubble = new Bubble(x, y, BUBBLE_SIZE, photo);
+ } else {
+ contact_bubble = new Bubble(x, y, BUBBLE_SIZE, getActivity(), R.drawable.ic_contact_picture);
+ }
+ contact_bubble.contact = contact;
- model.addBubble(contact_bubble);
- contacts.put(contact, contact_bubble);
+ model.addBubble(contact_bubble);
+ contacts.put(contact, contact_bubble);
- return contact_bubble;
- }
+ return contact_bubble;
+ }
- /**
- * Should be called when a bubble is removed from the model
- */
- void bubbleRemoved(Bubble b) {
- if(b.contact == null) {
- return;
- }
+ /**
+ * Should be called when a bubble is removed from the model
+ */
+ void bubbleRemoved(Bubble b) {
+ if (b.contact == null) {
+ return;
+ }
- contacts.remove(b.contact);
- }
+ contacts.remove(b.contact);
+ }
- public void changeCallState(String callID, String newState) {
+ public void changeCallState(String callID, String newState) {
- Log.w(TAG, "Changing call state of "+callID);
- mCall.printCallInfo();
- if(!callID.equals(mCall.getCallId()))
- return;
+ Log.w(TAG, "Changing call state of " + callID);
+ mCall.printCallInfo();
+ if (!callID.equals(mCall.getCallId()))
+ return;
- mCall.setCallState(newState);
- if(mCall.isOngoing()){
- initNormalStateDisplay();
- }
- }
+ mCall.setCallState(newState);
+ if (mCall.isOngoing()) {
+ initNormalStateDisplay();
+ }
+ }
- public boolean draggingBubble()
- {
- return view == null ? false : view.isDraggingBubble();
- }
+ public boolean draggingBubble() {
+ return view == null ? false : view.isDraggingBubble();
+ }
- @Override
- public void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
- {
- Log.i(TAG, "Init fragment " + mCall.getCallId());
+ @Override
+ public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
+ Log.i(TAG, "Init fragment " + mCall.getCallId());
- mCall.printCallInfo();
+ mCall.printCallInfo();
- if (mCall.isIncoming() && mCall.isRinging()) {
- initIncomingCallDisplay();
- } else {
- if (mCall.isRinging()) {
- initOutGoingCallDisplay();
- }
- try {
- if (mCall.isOutGoing() && mCallbacks.getService().getCall(mCall.getCallId()) == null) {
- mCallbacks.getService().placeCall(mCall);
- initOutGoingCallDisplay();
- } else if(mCall.isOutGoing() && mCall.isRinging()){
- initOutGoingCallDisplay();
- }
- } catch (RemoteException e) {
- Log.e(TAG, e.toString());
- }
- }
+ if (mCall.isIncoming() && mCall.isRinging()) {
+ initIncomingCallDisplay();
+ } else {
+ if (mCall.isRinging()) {
+ initOutGoingCallDisplay();
+ }
+ try {
+ if (mCall.isOutGoing() && mCallbacks.getService().getCall(mCall.getCallId()) == null) {
+ mCallbacks.getService().placeCall(mCall);
+ initOutGoingCallDisplay();
+ } else if (mCall.isOutGoing() && mCall.isRinging()) {
+ initOutGoingCallDisplay();
+ }
+ } catch (RemoteException e) {
+ Log.e(TAG, e.toString());
+ }
+ }
- if(mCall.isOngoing()){
- initNormalStateDisplay();
- }
+ if (mCall.isOngoing()) {
+ initNormalStateDisplay();
+ }
- }
+ }
- @Override
- public void surfaceCreated(SurfaceHolder holder)
- {
- }
+ @Override
+ public void surfaceCreated(SurfaceHolder holder) {
+ }
- @Override
- public void surfaceDestroyed(SurfaceHolder holder)
- {
- }
+ @Override
+ public void surfaceDestroyed(SurfaceHolder holder) {
+ }
public BubblesView getBubbleView() {
return view;
-
- }
+ }
}
diff --git a/src/com/savoirfairelinux/sflphone/fragments/CallListFragment.java b/src/com/savoirfairelinux/sflphone/fragments/CallListFragment.java
index d308743..f91c24d 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/CallListFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/CallListFragment.java
@@ -51,10 +51,10 @@
import android.widget.BaseExpandableListAdapter;
import android.widget.Button;
import android.widget.ExpandableListView;
-import android.widget.Toast;
-import android.widget.ExpandableListView.OnGroupClickListener;
import android.widget.ImageButton;
+import android.widget.RelativeLayout;
import android.widget.TextView;
+import android.widget.Toast;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.model.SipCall;
@@ -67,6 +67,9 @@
CallListAdapter mAdapter;
+ public static final int REQUEST_TRANSFER = 10;
+ public static final int REQUEST_CONF = 20;
+
@Override
public void onCreate(Bundle savedBundle) {
super.onCreate(savedBundle);
@@ -127,23 +130,10 @@
list = (ExpandableListView) rootView.findViewById(R.id.call_list);
list.setDividerHeight(2);
list.setGroupIndicator(null);
- list.setClickable(true);
-
list.setAdapter(mAdapter);
+ list.setClickable(true);
list.setItemsCanFocus(true);
- // list.setOnItemClickListener(itemClickListener);
- // list.setOnItemLongClickListener(itemLongClickListener);
- list.setOnGroupClickListener(new OnGroupClickListener() {
-
- @Override
- public boolean onGroupClick(ExpandableListView parent, View v, int groupPosition, long id) {
- mCallbacks.onCallSelected(mAdapter.getGroup(groupPosition));
- // if (v.getId() == R.id.expand_button)
- // Log.i(TAG, "View clicked ");
- return true;
- }
- });
return rootView;
}
@@ -157,50 +147,90 @@
}
- // OnItemClickListener itemClickListener = new OnItemClickListener() {
- // @Override
- // public void onItemClick(AdapterView<?> arg0, View view, final int pos, long arg3) {
- // Toast.makeText(getActivity(), "ItemClicked", Toast.LENGTH_SHORT).show();
- // mCallbacks.onCallSelected(mAdapter.getGroup(pos));
- // }
- // };
-
- //
- // private OnItemLongClickListener itemLongClickListener = new OnItemLongClickListener() {
- //
- // @Override
- // public boolean onItemLongClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
- //
- // return false;
- // }
- // };
-
- private void makeTransferDialog() {
+ private void makeTransferDialog(int groupPosition) {
FragmentManager fm = getFragmentManager();
- CallActionsDFragment editNameDialog = new CallActionsDFragment();
+ TransferDFragment editNameDialog = new TransferDFragment();
Bundle b = new Bundle();
- b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls());
-
+ b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
+ b.putParcelable("call_selected", mAdapter.getGroup(groupPosition));
editNameDialog.setArguments(b);
- editNameDialog.setTargetFragment(this, 10);
+ editNameDialog.setTargetFragment(this, REQUEST_TRANSFER);
editNameDialog.show(fm, "dialog");
}
+ private void makeConferenceDialog(int groupPosition) {
+ FragmentManager fm = getFragmentManager();
+ ConferenceDFragment confDialog = new ConferenceDFragment();
+
+ Bundle b = new Bundle();
+ b.putParcelableArrayList("calls", mAdapter.getConcurrentCalls(groupPosition));
+ b.putParcelable("call_selected", mAdapter.getGroup(groupPosition));
+ confDialog.setArguments(b);
+ confDialog.setTargetFragment(this, REQUEST_CONF);
+ confDialog.show(fm, "dialog");
+
+ }
+
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
+ SipCall transfer = null;
+ if (requestCode == REQUEST_TRANSFER) {
+ switch (resultCode) {
+ case 0:
+ SipCall c = data.getParcelableExtra("target");
+ transfer = data.getParcelableExtra("transfer");
+ try {
- if (requestCode == 10) {
- SipCall c = data.getParcelableExtra("selected_call");
- try {
- mCallbacks.getService().attendedTransfer(mAdapter.getCurrentCall(), c.getCallId());
- } catch (RemoteException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
+ mCallbacks.getService().attendedTransfer(transfer.getCallId(), c.getCallId());
+ mAdapter.remove(transfer);
+
+ mAdapter.notifyDataSetChanged();
+ } catch (RemoteException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ Toast.makeText(getActivity(), "Transfer complete", Toast.LENGTH_LONG).show();
+ break;
+
+ case 1:
+ String to = data.getStringExtra("to_number");
+ transfer = data.getParcelableExtra("transfer");
+ try {
+ Toast.makeText(getActivity(), "Transferring " + transfer.getContacts().get(0).getmDisplayName() + " to " + to, Toast.LENGTH_SHORT)
+ .show();
+ mCallbacks.getService().transfer(transfer.getCallId(), to);
+
+ } catch (RemoteException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ break;
+
+ default:
+ break;
}
- Toast.makeText(getActivity(), "Thats ok", Toast.LENGTH_LONG).show();
+ } else if(requestCode == REQUEST_CONF){
+ switch (resultCode) {
+ case 0:
+ SipCall call1 = data.getParcelableExtra("call1");
+ SipCall call2 = data.getParcelableExtra("call2");
+ try {
+
+ mCallbacks.getService().createConference(call1.getCallId(), call2.getCallId());
+
+ } catch (RemoteException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ Toast.makeText(getActivity(), "Conference created", Toast.LENGTH_LONG).show();
+ break;
+
+ default:
+ break;
+ }
}
}
@@ -221,18 +251,23 @@
mContext = activity;
}
+ public void remove(SipCall transfer) {
+ calls.remove(transfer);
+
+ }
+
public String getCurrentCall() {
- for(int i = 0 ; i < calls.size(); ++i){
- if(calls.get(i).getCallStateInt() == SipCall.state.CALL_STATE_CURRENT)
+ for (int i = 0; i < calls.size(); ++i) {
+ if (calls.get(i).getCallStateInt() == SipCall.state.CALL_STATE_CURRENT)
return calls.get(i).getCallId();
}
return "";
}
- public ArrayList<SipCall> getConcurrentCalls() {
+ public ArrayList<SipCall> getConcurrentCalls(int position) {
ArrayList<SipCall> toReturn = new ArrayList<SipCall>();
for (int i = 0; i < calls.size(); ++i) {
- if (calls.get(i).getCallStateInt() != SipCall.state.CALL_STATE_CURRENT)
+ if (position != i)
toReturn.add(calls.get(i));
}
return toReturn;
@@ -297,15 +332,16 @@
@Override
public void onClick(View v) {
-
+ makeConferenceDialog(groupPosition);
}
+
});
((Button) convertView.findViewById(R.id.action_transfer)).setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
- makeTransferDialog();
+ makeTransferDialog(groupPosition);
}
});
@@ -355,6 +391,15 @@
((TextView) convertView.findViewById(R.id.call_title)).setText(call.getContacts().get(0).getmDisplayName());
((TextView) convertView.findViewById(R.id.call_status)).setText("" + call.getCallStateString());
+ ((RelativeLayout) convertView.findViewById(R.id.call_entry)).setOnClickListener(new OnClickListener() {
+
+ @Override
+ public void onClick(View v) {
+ mCallbacks.onCallSelected(getGroup(groupPosition));
+
+ }
+ });
+
((ImageButton) convertView.findViewById(R.id.expand_button)).setOnClickListener(new OnClickListener() {
@Override
@@ -362,11 +407,11 @@
final Animation animRotate = AnimationUtils.loadAnimation(getActivity(), R.animator.anim_rotate);
if (isExpanded) {
list.collapseGroup(groupPosition);
-// ((ImageButton) v).startAnimation(animRotate);
+ // ((ImageButton) v).startAnimation(animRotate);
((ImageButton) v).setRotation(0);
} else {
list.expandGroup(groupPosition);
-// ((ImageButton) v).startAnimation(animRotate);
+ // ((ImageButton) v).startAnimation(animRotate);
((ImageButton) v).setRotation(180);
}
diff --git a/src/com/savoirfairelinux/sflphone/fragments/ConferenceDFragment.java b/src/com/savoirfairelinux/sflphone/fragments/ConferenceDFragment.java
new file mode 100644
index 0000000..f8ba81d
--- /dev/null
+++ b/src/com/savoirfairelinux/sflphone/fragments/ConferenceDFragment.java
@@ -0,0 +1,170 @@
+package com.savoirfairelinux.sflphone.fragments;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.List;
+
+import android.app.AlertDialog;
+import android.app.Dialog;
+import android.app.DialogFragment;
+import android.app.LoaderManager;
+import android.content.Context;
+import android.content.DialogInterface;
+import android.content.DialogInterface.OnShowListener;
+import android.content.Intent;
+import android.content.Loader;
+import android.location.Address;
+import android.location.Geocoder;
+import android.net.Uri;
+import android.os.Bundle;
+import android.provider.ContactsContract.Contacts;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.AdapterView;
+import android.widget.AdapterView.OnItemClickListener;
+import android.widget.ArrayAdapter;
+import android.widget.AutoCompleteTextView;
+import android.widget.BaseAdapter;
+import android.widget.Button;
+import android.widget.Filter;
+import android.widget.Filterable;
+import android.widget.ListView;
+import android.widget.TextView;
+import android.widget.Toast;
+
+import com.savoirfairelinux.sflphone.R;
+import com.savoirfairelinux.sflphone.loaders.ContactsLoader;
+import com.savoirfairelinux.sflphone.model.CallContact;
+import com.savoirfairelinux.sflphone.model.SipCall;
+
+public class ConferenceDFragment extends DialogFragment implements LoaderManager.LoaderCallbacks<Bundle> {
+
+
+ SimpleCallListAdapter mAdapter;
+
+ /**
+ * Create a new instance of CallActionsDFragment
+ */
+ static ConferenceDFragment newInstance(int num) {
+ ConferenceDFragment f = new ConferenceDFragment();
+ return f;
+ }
+
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+
+ // Pick a style based on the num.
+ int style = DialogFragment.STYLE_NORMAL, theme = 0;
+ setStyle(style, theme);
+ }
+
+ @Override
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ View rootView = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_conference, null);
+
+ ArrayList<SipCall> calls = getArguments().getParcelableArrayList("calls");
+ final SipCall call_selected = getArguments().getParcelable("call_selected");
+
+ mAdapter = new SimpleCallListAdapter(getActivity(), calls);
+ ListView list = (ListView) rootView.findViewById(R.id.concurrent_calls);
+ list.setAdapter(mAdapter);
+ list.setOnItemClickListener(new OnItemClickListener() {
+
+ @Override
+ public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long arg3) {
+
+ Intent in = new Intent();
+
+ in.putExtra("call1", call_selected);
+ in.putExtra("call2", mAdapter.getItem(pos));
+ getTargetFragment().onActivityResult(getTargetRequestCode(), 0, in);
+ dismiss();
+ }
+ });
+ list.setEmptyView(rootView.findViewById(R.id.empty_view));
+
+
+
+ final AlertDialog a = new AlertDialog.Builder(getActivity()).setView(rootView).setTitle("Transfer " + call_selected.getContacts().get(0))
+ .setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int whichButton) {
+
+ dismiss();
+ }
+ }).create();
+
+ return a;
+ }
+
+ @Override
+ public Loader<Bundle> onCreateLoader(int id, Bundle args) {
+ Uri baseUri;
+
+ if (args != null) {
+ baseUri = Uri.withAppendedPath(Contacts.CONTENT_FILTER_URI, Uri.encode(args.getString("filter")));
+ } else {
+ baseUri = Contacts.CONTENT_URI;
+ }
+ ContactsLoader l = new ContactsLoader(getActivity(), baseUri);
+ l.forceLoad();
+ return l;
+ }
+
+ @Override
+ public void onLoadFinished(Loader<Bundle> loader, Bundle data) {
+
+ ArrayList<CallContact> tmp = data.getParcelableArrayList("Contacts");
+
+ }
+
+ @Override
+ public void onLoaderReset(Loader<Bundle> loader) {
+ // Thi is called when the last Cursor provided to onLoadFinished
+ // mListAdapter.swapCursor(null);
+ }
+
+
+
+ private class SimpleCallListAdapter extends BaseAdapter {
+
+ private LayoutInflater mInflater;
+ ArrayList<SipCall> calls;
+
+ public SimpleCallListAdapter(final Context context, ArrayList<SipCall> calls2) {
+ super();
+ mInflater = LayoutInflater.from(context);
+ calls = calls2;
+ }
+
+ @Override
+ public View getView(final int position, final View convertView, final ViewGroup parent) {
+ final TextView tv;
+ if (convertView != null) {
+ tv = (TextView) convertView;
+ } else {
+ tv = (TextView) mInflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false);
+ }
+
+ tv.setText(calls.get(position).getContacts().get(0).getmDisplayName());
+ return tv;
+ }
+
+ @Override
+ public int getCount() {
+ return calls.size();
+ }
+
+ @Override
+ public SipCall getItem(int pos) {
+ return calls.get(pos);
+ }
+
+ @Override
+ public long getItemId(int position) {
+ return 0;
+ }
+ }
+
+}
diff --git a/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java b/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java
index e3dcebe..73a4e76 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/DialingFragment.java
@@ -65,7 +65,7 @@
public class DialingFragment extends Fragment implements LoaderCallbacks<ArrayList<Account>> {
- private static final String TAG = HistoryFragment.class.getSimpleName();
+ private static final String TAG = DialingFragment.class.getSimpleName();
public static final String ARG_SECTION_NUMBER = "section_number";
private boolean isReady;
private ISipService service;
diff --git a/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java b/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java
index ad1e472..1f494a4 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/HistoryFragment.java
@@ -114,7 +114,7 @@
public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {
View inflatedView = inflater.inflate(R.layout.frag_history, parent, false);
- ((ListView)inflatedView.findViewById(android.R.id.list)).setOnItemClickListener(new OnItemClickListener() {
+ ((ListView) inflatedView.findViewById(android.R.id.list)).setOnItemClickListener(new OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long arg3) {
@@ -128,18 +128,21 @@
public void onStart() {
super.onStart();
Log.w(TAG, "onStart");
-
+ getLoaderManager().restartLoader(LoaderConstants.HISTORY_LOADER, null, this);
+
}
- public void makeNewCall(int position){
+ public void makeNewCall(int position) {
mCallbacks.onCallDialed(String.valueOf(mAdapter.getItem(position).getAccountID()), mAdapter.getItem(position).getNumber());
}
@Override
public Loader<ArrayList<HistoryEntry>> onCreateLoader(int id, Bundle args) {
+
HistoryLoader loader = new HistoryLoader(getActivity(), mCallbacks.getService());
loader.forceLoad();
return loader;
+
}
@Override
@@ -155,4 +158,5 @@
// TODO Auto-generated method stub
}
+
}
diff --git a/src/com/savoirfairelinux/sflphone/fragments/CallActionsDFragment.java b/src/com/savoirfairelinux/sflphone/fragments/TransferDFragment.java
similarity index 74%
rename from src/com/savoirfairelinux/sflphone/fragments/CallActionsDFragment.java
rename to src/com/savoirfairelinux/sflphone/fragments/TransferDFragment.java
index 62d3daa..18bc424 100644
--- a/src/com/savoirfairelinux/sflphone/fragments/CallActionsDFragment.java
+++ b/src/com/savoirfairelinux/sflphone/fragments/TransferDFragment.java
@@ -10,6 +10,7 @@
import android.app.LoaderManager;
import android.content.Context;
import android.content.DialogInterface;
+import android.content.DialogInterface.OnShowListener;
import android.content.Intent;
import android.content.Loader;
import android.location.Address;
@@ -25,26 +26,29 @@
import android.widget.ArrayAdapter;
import android.widget.AutoCompleteTextView;
import android.widget.BaseAdapter;
+import android.widget.Button;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ListView;
import android.widget.TextView;
+import android.widget.Toast;
import com.savoirfairelinux.sflphone.R;
import com.savoirfairelinux.sflphone.loaders.ContactsLoader;
import com.savoirfairelinux.sflphone.model.CallContact;
import com.savoirfairelinux.sflphone.model.SipCall;
-public class CallActionsDFragment extends DialogFragment implements LoaderManager.LoaderCallbacks<Bundle>{
+public class TransferDFragment extends DialogFragment implements LoaderManager.LoaderCallbacks<Bundle> {
private AutoCompleteTextView mEditText;
private AutoCompleteAdapter autoCompleteAdapter;
SimpleCallListAdapter mAdapter;
+
/**
* Create a new instance of CallActionsDFragment
*/
- static CallActionsDFragment newInstance(int num) {
- CallActionsDFragment f = new CallActionsDFragment();
+ static TransferDFragment newInstance(int num) {
+ TransferDFragment f = new TransferDFragment();
return f;
}
@@ -56,33 +60,14 @@
int style = DialogFragment.STYLE_NORMAL, theme = 0;
setStyle(style, theme);
}
-
-// @Override
-// public Dialog onCreateDialog(Bundle savedInstanceState) {
-// return new AlertDialog.Builder(getActivity())
-// .setPositiveButton(android.R.string.ok,
-// new DialogInterface.OnClickListener() {
-// public void onClick(DialogInterface dialog, int whichButton) {
-//
-// }
-// }
-// )
-// .setNegativeButton(android.R.string.no,
-// new DialogInterface.OnClickListener() {
-// public void onClick(DialogInterface dialog, int whichButton) {
-//
-// }
-// }
-// )
-// .create();
-// }
@Override
- public View onCreateView(LayoutInflater inflater, ViewGroup container,
- Bundle savedInstanceState) {
- View rootView = inflater.inflate(R.layout.dialog_action_calls, container);
-
+ public Dialog onCreateDialog(Bundle savedInstanceState) {
+ View rootView = LayoutInflater.from(getActivity()).inflate(R.layout.dialog_transfer, null);
+
ArrayList<SipCall> calls = getArguments().getParcelableArrayList("calls");
+ final SipCall call_selected = getArguments().getParcelable("call_selected");
+
mAdapter = new SimpleCallListAdapter(getActivity(), calls);
ListView list = (ListView) rootView.findViewById(R.id.concurrent_calls);
list.setAdapter(mAdapter);
@@ -90,24 +75,58 @@
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int pos, long arg3) {
-
+
Intent in = new Intent();
- in.putExtra("selected_call", mAdapter.getItem(pos));
+ in.putExtra("target", mAdapter.getItem(pos));
+ in.putExtra("transfer", call_selected);
getTargetFragment().onActivityResult(getTargetRequestCode(), 0, in);
dismiss();
}
});
list.setEmptyView(rootView.findViewById(R.id.empty_view));
-
+
mEditText = (AutoCompleteTextView) rootView.findViewById(R.id.external_number);
mEditText.setAdapter(autoCompleteAdapter);
- getDialog().setTitle("Transfer");
-
+ final AlertDialog a = new AlertDialog.Builder(getActivity()).setView(rootView)
+ .setTitle("Transfer " + call_selected.getContacts().get(0))
+ .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int whichButton) {
+
+ }
+ }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {
+ public void onClick(DialogInterface dialog, int whichButton) {
- return rootView;
+ dismiss();
+ }
+ }).create();
+
+ a.setOnShowListener(new OnShowListener() {
+
+ @Override
+ public void onShow(DialogInterface dialog) {
+ Button b = a.getButton(AlertDialog.BUTTON_POSITIVE);
+ b.setOnClickListener(new View.OnClickListener() {
+
+ @Override
+ public void onClick(View view) {
+ if(mEditText.getText().length() == 0){
+ Toast.makeText(getActivity(), "Enter a number to transfer this call", Toast.LENGTH_SHORT).show();
+ } else {
+ Intent in = new Intent();
+ in.putExtra("to_number", mEditText.getText().toString());
+ in.putExtra("transfer", call_selected);
+ getTargetFragment().onActivityResult(getTargetRequestCode(), 1, in);
+ dismiss();
+ }
+ }
+ });
+
+ }
+ });
+ return a;
}
-
+
@Override
public Loader<Bundle> onCreateLoader(int id, Bundle args) {
Uri baseUri;
@@ -125,11 +144,8 @@
@Override
public void onLoadFinished(Loader<Bundle> loader, Bundle data) {
-
ArrayList<CallContact> tmp = data.getParcelableArrayList("Contacts");
-
-
}
@Override
@@ -137,20 +153,19 @@
// Thi is called when the last Cursor provided to onLoadFinished
// mListAdapter.swapCursor(null);
}
-
private class AutoCompleteAdapter extends ArrayAdapter<Address> implements Filterable {
-
+
private LayoutInflater mInflater;
private Geocoder mGeocoder;
private StringBuilder mSb = new StringBuilder();
-
+
public AutoCompleteAdapter(final Context context) {
super(context, -1);
mInflater = LayoutInflater.from(context);
mGeocoder = new Geocoder(context);
}
-
+
@Override
public View getView(final int position, final View convertView, final ViewGroup parent) {
final TextView tv;
@@ -159,12 +174,10 @@
} else {
tv = (TextView) mInflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false);
}
-
+
return tv;
}
-
-
@Override
public Filter getFilter() {
Filter myFilter = new Filter() {
@@ -180,14 +193,14 @@
if (addressList == null) {
addressList = new ArrayList<Address>();
}
-
+
final FilterResults filterResults = new FilterResults();
filterResults.values = addressList;
filterResults.count = addressList.size();
-
+
return filterResults;
}
-
+
@SuppressWarnings("unchecked")
@Override
protected void publishResults(final CharSequence contraint, final FilterResults results) {
@@ -201,7 +214,7 @@
notifyDataSetInvalidated();
}
}
-
+
@Override
public CharSequence convertResultToString(final Object resultValue) {
return resultValue == null ? "" : ((Address) resultValue).getAddressLine(0);
@@ -210,19 +223,18 @@
return myFilter;
}
}
-
- private class SimpleCallListAdapter extends BaseAdapter {
-
+
+ private class SimpleCallListAdapter extends BaseAdapter {
+
private LayoutInflater mInflater;
ArrayList<SipCall> calls;
-
-
+
public SimpleCallListAdapter(final Context context, ArrayList<SipCall> calls2) {
super();
mInflater = LayoutInflater.from(context);
calls = calls2;
}
-
+
@Override
public View getView(final int position, final View convertView, final ViewGroup parent) {
final TextView tv;
@@ -231,7 +243,7 @@
} else {
tv = (TextView) mInflater.inflate(android.R.layout.simple_dropdown_item_1line, parent, false);
}
-
+
tv.setText(calls.get(position).getContacts().get(0).getmDisplayName());
return tv;
}
diff --git a/src/com/savoirfairelinux/sflphone/loaders/HistoryLoader.java b/src/com/savoirfairelinux/sflphone/loaders/HistoryLoader.java
index 91a83bf..fea6fd3 100644
--- a/src/com/savoirfairelinux/sflphone/loaders/HistoryLoader.java
+++ b/src/com/savoirfairelinux/sflphone/loaders/HistoryLoader.java
@@ -39,6 +39,9 @@
historyEntries = new HashMap<String, HistoryEntry>();
+ if(service == null){
+ return new ArrayList<HistoryEntry>();
+ }
try {
ArrayList<HashMap<String, String>> history = (ArrayList<HashMap<String, String>>) service.getHistory();
Log.i(TAG, "history size:" + history.size());
diff --git a/src/com/savoirfairelinux/sflphone/model/BubblesView.java b/src/com/savoirfairelinux/sflphone/model/BubblesView.java
index 1beb761..8accf4c 100644
--- a/src/com/savoirfairelinux/sflphone/model/BubblesView.java
+++ b/src/com/savoirfairelinux/sflphone/model/BubblesView.java
@@ -148,13 +148,16 @@
Log.w(TAG, "surfaceDestroyed");
boolean retry = true;
thread.setRunning(false);
+ thread.setPaused(false);
while (retry) {
try {
+ Log.w(TAG, "joining...");
thread.join();
retry = false;
} catch (InterruptedException e) {
}
}
+ Log.w(TAG, "done");
thread = null;
}
diff --git a/src/com/savoirfairelinux/sflphone/service/ISipService.aidl b/src/com/savoirfairelinux/sflphone/service/ISipService.aidl
index 589bdb4..bfcfeb5 100644
--- a/src/com/savoirfairelinux/sflphone/service/ISipService.aidl
+++ b/src/com/savoirfairelinux/sflphone/service/ISipService.aidl
@@ -40,6 +40,7 @@
void attendedTransfer(in String transferID, in String targetID);
/* Conference related methods */
+ void createConference(in String call1, in String call2);
void removeConference(in String confID);
void joinParticipant(in String sel_callID, in String drag_callID);
void createConfFromParticipantList(in List participants);
diff --git a/src/com/savoirfairelinux/sflphone/service/SipService.java b/src/com/savoirfairelinux/sflphone/service/SipService.java
index 7bc1696..51c823b 100644
--- a/src/com/savoirfairelinux/sflphone/service/SipService.java
+++ b/src/com/savoirfairelinux/sflphone/service/SipService.java
@@ -593,6 +593,7 @@
while (!runInstance.isDone()) {
// Log.w(TAG, "Waiting for getHistory");
}
+ Log.i(TAG, "SipService.getHistory() DONE");
VectMap swigmap = (VectMap) runInstance.getVal();
ArrayList<HashMap<String, String>> nativemap = HistoryHandler.convertSwigToNative(swigmap);
@@ -793,6 +794,17 @@
Log.e(TAG, "getConferenceList not implemented");
return null;
}
+
+ @Override
+ public void createConference(final String call1, final String call2) throws RemoteException {
+ getExecutor().execute(new SipRunnable() {
+ @Override
+ protected void doRun() throws SameThreadException, RemoteException {
+ Log.i(TAG, "SipService.createConference() thread running...");
+ callManagerJNI.createConference(call1, call2);
+ }
+ });
+ }
@Override
public String getConferenceId(String callID) throws RemoteException {
@@ -964,5 +976,7 @@
}
+
+
};
}