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

* #31377: incoming calls display over current call

parent becb8032
No related branches found
No related tags found
No related merge requests found
......@@ -213,7 +213,6 @@ public class CallActivity extends Activity implements CallInterface, CallFragmen
tmp.getParticipants().add(call);
Bundle b = new Bundle();
b.putParcelable("conference", tmp);
Log.i(TAG, "Arguments set");
mCurrentCallFragment.setArguments(b);
} catch (RemoteException e) {
e.printStackTrace();
......@@ -247,7 +246,13 @@ public class CallActivity extends Activity implements CallInterface, CallFragmen
@Override
public void incomingCall(Intent call) {
Bundle b = new Bundle();
Conference tmp = new Conference("-1");
tmp.getParticipants().add((SipCall)call.getParcelableExtra("newcall"));
b.putParcelable("conference", tmp);
mCurrentCallFragment = new CallFragment();
mCurrentCallFragment.setArguments(b);
getFragmentManager().beginTransaction().replace(R.id.ongoingcall_pane, mCurrentCallFragment).commit();
// mCallsFragment.update();
}
......@@ -375,11 +380,11 @@ public class CallActivity extends Activity implements CallInterface, CallFragmen
}
@Override
public void replaceCurrentCallDisplayed() {
public void terminateCall() {
mHandler.removeCallbacks(mUpdateTimeTask);
mCurrentCallFragment.getBubbleView().stopThread();
getFragmentManager().beginTransaction().remove(mCurrentCallFragment).commit();
mCurrentCallFragment = null;
//getFragmentManager().beginTransaction().remove(mCurrentCallFragment).commit();
//mCurrentCallFragment = null;
finish();
}
......
......@@ -97,8 +97,7 @@ public class CallFragment extends Fragment implements Callback {
@Override
public void onCreate(Bundle savedBundle) {
super.onCreate(savedBundle);
Bundle b = getArguments();
conf = new Conference((Conference) b.getParcelable("conference"));
conf = new Conference((Conference) getArguments().getParcelable("conference"));
model = new BubbleModel(getResources().getDisplayMetrics().density);
BUBBLE_SIZE = getResources().getDimension(R.dimen.bubble_size);
Log.e(TAG, "BUBBLE_SIZE " + BUBBLE_SIZE);
......@@ -117,7 +116,7 @@ public class CallFragment extends Fragment implements Callback {
}
@Override
public void replaceCurrentCallDisplayed() {
public void terminateCall() {
}
@Override
......@@ -141,7 +140,7 @@ public class CallFragment extends Fragment implements Callback {
public void slideChatScreen();
public void replaceCurrentCallDisplayed();
public void terminateCall();
}
@Override
......@@ -411,7 +410,7 @@ public class CallFragment extends Fragment implements Callback {
}
if (conf.getParticipants().size() == 0) {
mCallbacks.replaceCurrentCallDisplayed();
mCallbacks.terminateCall();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment