Enhance conference activity style + permute calls.
This commit is contained in:
parent
5965b1b33c
commit
9f1ee3f868
12 changed files with 120 additions and 56 deletions
|
@ -61,7 +61,7 @@
|
||||||
</intent-filter>
|
</intent-filter>
|
||||||
</activity>
|
</activity>
|
||||||
<activity android:name="org.linphone.ConferenceActivity"
|
<activity android:name="org.linphone.ConferenceActivity"
|
||||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
android:theme="@android:style/Theme.NoTitleBar"
|
||||||
android:screenOrientation="portrait">
|
android:screenOrientation="portrait">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
<action android:name="android.intent.action.MAIN" />
|
<action android:name="android.intent.action.MAIN" />
|
||||||
|
|
BIN
res/drawable/conf_permute.png
Normal file
BIN
res/drawable/conf_permute.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1 KiB |
BIN
res/drawable/numpad_big.png
Normal file
BIN
res/drawable/numpad_big.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.6 KiB |
BIN
res/drawable/plus.png
Normal file
BIN
res/drawable/plus.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
|
@ -7,35 +7,36 @@
|
||||||
android:paddingRight="8dp">
|
android:paddingRight="8dp">
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/conf_header" android:layout_alignParentTop="true"
|
<LinearLayout android:id="@+id/conf_control_buttons"
|
||||||
|
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||||
|
android:layout_alignParentTop="true">
|
||||||
|
<Button android:id="@+id/conf_simple_permute" style="@style/conf_icon_text_button"
|
||||||
|
android:drawableTop="@drawable/conf_permute" android:text="@string/conf_simple_permute_bt_txt"/>
|
||||||
|
<Button android:id="@+id/conf_simple_merge" style="@style/conf_icon_text_button"
|
||||||
|
android:drawableTop="@drawable/conf_merge"
|
||||||
|
android:text="@string/conf_simple_merge_bt_txt"/>
|
||||||
|
<Button android:id="@+id/conf_simple_transfer" style="@style/conf_icon_text_button"
|
||||||
|
android:drawableTop="@drawable/conf_transfer"
|
||||||
|
android:text="@string/conf_simple_transfer_bt_txt" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout android:id="@+id/conf_header" android:layout_below="@id/conf_control_buttons"
|
||||||
android:orientation="vertical" android:layout_marginBottom="10dip"
|
android:orientation="vertical" android:layout_marginBottom="10dip"
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content" >
|
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||||
|
android:layout_alignWithParentIfMissing="true">
|
||||||
<TextView android:text="@string/conf_text_you_host_a_conference"
|
<TextView android:text="@string/conf_text_you_host_a_conference"
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
||||||
android:gravity="center"/>
|
android:gravity="center"/>
|
||||||
<!-- <TextView android:id="@+id/conf_self_attending"-->
|
|
||||||
<!-- android:layout_width="fill_parent" android:layout_height="wrap_content"/>-->
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/conf_bottom_row" android:layout_alignParentBottom="true"
|
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content">
|
|
||||||
<Button android:text="@string/AddCallButtonText" android:id="@+id/addCall"
|
|
||||||
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
|
||||||
|
|
||||||
<org.linphone.ui.HangCallButton android:id="@+id/incallHang" android:layout_width="0dip" android:layout_height="wrap_content"
|
|
||||||
android:src="@drawable/mini_stopcall_red" android:layout_weight="1" />
|
|
||||||
|
|
||||||
<Button android:id="@+id/incallNumpadShow" android:text="@string/show_send_dtmfs_button"
|
|
||||||
android:layout_width="wrap_content" android:layout_height="wrap_content"/>
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/conf_menu_row"
|
<LinearLayout android:id="@+id/conf_speaker_mic_row"
|
||||||
android:layout_above="@id/conf_bottom_row"
|
android:layout_alignParentBottom="true"
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content">
|
android:layout_width="fill_parent" android:layout_height="wrap_content">
|
||||||
<ToggleButton android:id="@+id/toggleMuteMic" style="@style/conf_toggle_button"
|
<ToggleButton android:id="@+id/toggleMuteMic" style="@style/conf_toggle_button"
|
||||||
android:textOn="@string/mutemic_button_txt" android:textOff="@string/mutemic_button_txt" />
|
android:textOn="@string/mutemic_button_txt" android:textOff="@string/mutemic_button_txt" />
|
||||||
|
@ -46,15 +47,20 @@
|
||||||
android:visibility="gone"/>
|
android:visibility="gone"/>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout android:id="@+id/conf_simple_actions" android:visibility="visible"
|
<LinearLayout android:id="@+id/conf_terminate_row"
|
||||||
android:layout_width="fill_parent" android:layout_height="wrap_content"
|
android:layout_above="@id/conf_speaker_mic_row"
|
||||||
android:layout_above="@id/conf_menu_row"
|
android:layout_width="fill_parent" android:layout_height="wrap_content">
|
||||||
android:layout_centerInParent="true">
|
<Button android:text="@string/AddCallButtonText" android:id="@+id/addCall"
|
||||||
<Button android:id="@+id/conf_simple_merge" android:text="@string/conf_simple_merge" android:visibility="gone"
|
style="@style/conf_icon_text_button" android:drawableTop="@drawable/plus" />
|
||||||
android:layout_width="wrap_content" android:layout_height="wrap_content" />
|
|
||||||
|
<Button android:id="@+id/incallHang" style="@style/conf_icon_text_button"
|
||||||
|
android:drawableTop="@drawable/stopcall_red" android:text="@string/hangup"/>
|
||||||
|
|
||||||
|
<Button android:id="@+id/incallNumpadShow" style="@style/conf_icon_text_button"
|
||||||
|
android:text="@string/show_send_dtmfs_button" android:drawableTop="@drawable/numpad_big" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<FrameLayout android:id="@+id/incall_picture_box" android:layout_above="@id/conf_simple_actions"
|
<FrameLayout android:id="@+id/incall_picture_box" android:layout_above="@id/conf_terminate_row"
|
||||||
android:layout_height="wrap_content" android:layout_width="wrap_content"
|
android:layout_height="wrap_content" android:layout_width="wrap_content"
|
||||||
android:layout_centerInParent="true">
|
android:layout_centerInParent="true">
|
||||||
<ImageView android:id="@+id/incall_picture" android:visibility="gone"
|
<ImageView android:id="@+id/incall_picture" android:visibility="gone"
|
||||||
|
|
|
@ -5,6 +5,8 @@
|
||||||
<item name="android:layout_height">fill_parent</item>
|
<item name="android:layout_height">fill_parent</item>
|
||||||
<item name="android:layout_weight">1</item>
|
<item name="android:layout_weight">1</item>
|
||||||
<item name="android:gravity">fill_vertical</item>
|
<item name="android:gravity">fill_vertical</item>
|
||||||
|
<item name="android:singleLine">true</item>
|
||||||
|
<item name="android:ellipsize">marquee</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="callee_address" parent="@android:style/TextAppearance.Medium">
|
<style name="callee_address" parent="@android:style/TextAppearance.Medium">
|
||||||
|
|
12
res/values/conf_style.xml
Normal file
12
res/values/conf_style.xml
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<resources>
|
||||||
|
<style name="conf_icon_text_button" parent="@android:style/Widget.Button">
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_width">0dip</item>
|
||||||
|
<item name="android:layout_weight">1</item>
|
||||||
|
<item name="android:gravity">bottom|center_horizontal</item>
|
||||||
|
<item name="android:paddingLeft">15sp</item>
|
||||||
|
<item name="android:paddingRight">15sp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
|
@ -41,8 +41,11 @@
|
||||||
<string name="conf_choice_remove_from_conference">Remove from the conference</string>
|
<string name="conf_choice_remove_from_conference">Remove from the conference</string>
|
||||||
<string name="conf_choice_terminate">Terminate</string>
|
<string name="conf_choice_terminate">Terminate</string>
|
||||||
|
|
||||||
<string name="conf_simple_merge">Merge calls</string>
|
<string name="hangup">Hang up</string>
|
||||||
|
<string name="conf_simple_merge_bt_txt">Merge</string>
|
||||||
|
<string name="conf_simple_transfer_bt_txt">Transfer</string>
|
||||||
|
<string name="conf_simple_permute_bt_txt">Permute</string>
|
||||||
|
<string name="conf_simple_no_current_call">No active call</string>
|
||||||
<string name="show_send_dtmfs_button">DTMFs</string>
|
<string name="show_send_dtmfs_button">DTMFs</string>
|
||||||
|
|
||||||
<string name="conf_text_you_host_a_conference">You host a conference</string>
|
<string name="conf_text_you_host_a_conference">You host a conference</string>
|
||||||
|
|
|
@ -76,9 +76,8 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
return LinphoneManager.getLc();
|
return LinphoneManager.getLc();
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
protected List<LinphoneCall> getInitialCalls() {
|
protected List<LinphoneCall> getInitialCalls() {
|
||||||
return lc().getCalls();
|
return LinphoneUtils.getLinphoneCalls(lc());
|
||||||
}
|
}
|
||||||
|
|
||||||
// End override to test block
|
// End override to test block
|
||||||
|
@ -92,7 +91,10 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@SuppressWarnings("unused")
|
||||||
private void workaroundStatusBarBug() {
|
private void workaroundStatusBarBug() {
|
||||||
|
// call from onCreate to get a clean display on full screen no icons
|
||||||
|
// otherwise the upper side of the activity may be corrupted
|
||||||
getWindow().setFlags(
|
getWindow().setFlags(
|
||||||
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
|
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS,
|
||||||
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS);
|
||||||
|
@ -114,30 +116,33 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
confHeaderView.setOnClickListener(this);
|
confHeaderView.setOnClickListener(this);
|
||||||
|
|
||||||
findViewById(R.id.addCall).setOnClickListener(this);
|
findViewById(R.id.addCall).setOnClickListener(this);
|
||||||
findViewById(R.id.incallHang).setOnClickListener(this);
|
|
||||||
|
|
||||||
findViewById(R.id.incallNumpadShow).setOnClickListener(this);
|
findViewById(R.id.incallNumpadShow).setOnClickListener(this);
|
||||||
findViewById(R.id.conf_simple_merge).setOnClickListener(this);
|
findViewById(R.id.conf_simple_merge).setOnClickListener(this);
|
||||||
|
findViewById(R.id.conf_simple_transfer).setOnClickListener(this);
|
||||||
|
findViewById(R.id.conf_simple_permute).setOnClickListener(this);
|
||||||
|
|
||||||
findViewById(R.id.toggleMuteMic).setOnClickListener(this);
|
findViewById(R.id.toggleMuteMic).setOnClickListener(this);
|
||||||
findViewById(R.id.toggleSpeaker).setOnClickListener(this);
|
findViewById(R.id.toggleSpeaker).setOnClickListener(this);
|
||||||
|
|
||||||
waitHelper = new LinphoneManagerWaitHelper(this, this);
|
waitHelper = new LinphoneManagerWaitHelper(this, this);
|
||||||
waitHelper.doManagerDependentOnCreate();
|
waitHelper.doManagerDependentOnCreate();
|
||||||
workaroundStatusBarBug();
|
// workaroundStatusBarBug();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreateWhenManagerReady() {
|
public void onCreateWhenManagerReady() {
|
||||||
List<LinphoneCall> calls = getInitialCalls();
|
List<LinphoneCall> calls = getInitialCalls();
|
||||||
setListAdapter(new CalleeListAdapter(calls));
|
setListAdapter(new CalleeListAdapter(calls));
|
||||||
|
|
||||||
|
findViewById(R.id.incallHang).setOnClickListener(this);
|
||||||
}
|
}
|
||||||
@Override
|
@Override
|
||||||
public void onResumeWhenManagerReady() {
|
public void onResumeWhenManagerReady() {
|
||||||
registerLinphoneListener(true);
|
registerLinphoneListener(true);
|
||||||
updateCalleeImage();
|
updateCalleeImage();
|
||||||
updateConfState();
|
updateConfState();
|
||||||
updateMergeButtonState();
|
updateSimpleControlButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -251,6 +256,7 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
intent.putExtra(UriPickerActivity.EXTRA_PICKER_TYPE, UriPickerActivity.EXTRA_PICKER_TYPE_ADD);
|
intent.putExtra(UriPickerActivity.EXTRA_PICKER_TYPE, UriPickerActivity.EXTRA_PICKER_TYPE_ADD);
|
||||||
startActivityForResult(intent, ID_ADD_CALL);
|
startActivityForResult(intent, ID_ADD_CALL);
|
||||||
pauseCurrentCallOrLeaveConference();
|
pauseCurrentCallOrLeaveConference();
|
||||||
|
updateConfState();
|
||||||
break;
|
break;
|
||||||
case R.id.conf_header:
|
case R.id.conf_header:
|
||||||
View content = getLayoutInflater().inflate(R.layout.conf_choices_admin, null);
|
View content = getLayoutInflater().inflate(R.layout.conf_choices_admin, null);
|
||||||
|
@ -261,12 +267,15 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
switch (v.getId()) {
|
switch (v.getId()) {
|
||||||
case R.id.conf_add_all_to_conference_button:
|
case R.id.conf_add_all_to_conference_button:
|
||||||
lc().addAllToConference();
|
lc().addAllToConference();
|
||||||
|
updateConfState();
|
||||||
break;
|
break;
|
||||||
case R.id.conf_enter_button:
|
case R.id.conf_enter_button:
|
||||||
lc().enterConference();
|
lc().enterConference();
|
||||||
|
updateConfState();
|
||||||
break;
|
break;
|
||||||
case R.id.conf_leave_button:
|
case R.id.conf_leave_button:
|
||||||
lc().leaveConference();
|
lc().leaveConference();
|
||||||
|
updateConfState();
|
||||||
break;
|
break;
|
||||||
case R.id.conf_terminate_button:
|
case R.id.conf_terminate_button:
|
||||||
lc().terminateConference();
|
lc().terminateConference();
|
||||||
|
@ -294,8 +303,27 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
showDialog(numpad_dialog_id);
|
showDialog(numpad_dialog_id);
|
||||||
break;
|
break;
|
||||||
case R.id.conf_simple_merge:
|
case R.id.conf_simple_merge:
|
||||||
|
findViewById(R.id.conf_control_buttons).setVisibility(GONE);
|
||||||
lc().addAllToConference();
|
lc().addAllToConference();
|
||||||
break;
|
break;
|
||||||
|
case R.id.conf_simple_transfer:
|
||||||
|
findViewById(R.id.conf_control_buttons).setVisibility(GONE);
|
||||||
|
LinphoneCall tCall = lc().getCurrentCall();
|
||||||
|
if (tCall != null) {
|
||||||
|
prepareForTransferingExistingCall(tCall);
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, R.string.conf_simple_no_current_call, Toast.LENGTH_SHORT).show();
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case R.id.conf_simple_permute:
|
||||||
|
findViewById(R.id.conf_control_buttons).setVisibility(GONE);
|
||||||
|
for (LinphoneCall call : LinphoneUtils.getLinphoneCalls(lc())) {
|
||||||
|
if (State.Paused == call.getState()) {
|
||||||
|
lc().resumeCall(call);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case R.id.toggleMuteMic:
|
case R.id.toggleMuteMic:
|
||||||
lc().muteMic(((ToggleButton) v).isChecked());
|
lc().muteMic(((ToggleButton) v).isChecked());
|
||||||
break;
|
break;
|
||||||
|
@ -312,6 +340,23 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void prepareForTransferingExistingCall(final LinphoneCall call) {
|
||||||
|
final List<LinphoneCall> existingCalls = LinphoneUtils.getLinphoneCalls(lc());
|
||||||
|
existingCalls.remove(call);
|
||||||
|
final List<String> numbers = new ArrayList<String>(existingCalls.size());
|
||||||
|
Resources r = getResources();
|
||||||
|
for(LinphoneCall c : existingCalls) {
|
||||||
|
numbers.add(LinphoneManager.extractADisplayName(r, c.getRemoteAddress()));
|
||||||
|
}
|
||||||
|
ListAdapter adapter = new ArrayAdapter<String>(ConferenceActivity.this, android.R.layout.select_dialog_item, numbers);
|
||||||
|
DialogInterface.OnClickListener l = new DialogInterface.OnClickListener() {
|
||||||
|
public void onClick(DialogInterface dialog, int which) {
|
||||||
|
lc().transferCallToAnother(call, existingCalls.get(which));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
new AlertDialog.Builder(ConferenceActivity.this).setAdapter(adapter, l).create().show();
|
||||||
|
}
|
||||||
|
|
||||||
private class CallActionListener implements OnClickListener {
|
private class CallActionListener implements OnClickListener {
|
||||||
private LinphoneCall call;
|
private LinphoneCall call;
|
||||||
private Dialog dialog;
|
private Dialog dialog;
|
||||||
|
@ -344,20 +389,7 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.transfer_existing:
|
case R.id.transfer_existing:
|
||||||
@SuppressWarnings("unchecked") final List<LinphoneCall> existingCalls = lc().getCalls();
|
prepareForTransferingExistingCall(call);
|
||||||
existingCalls.remove(call);
|
|
||||||
final List<String> numbers = new ArrayList<String>(existingCalls.size());
|
|
||||||
Resources r = getResources();
|
|
||||||
for(LinphoneCall c : existingCalls) {
|
|
||||||
numbers.add(LinphoneManager.extractADisplayName(r, c.getRemoteAddress()));
|
|
||||||
}
|
|
||||||
ListAdapter adapter = new ArrayAdapter<String>(ConferenceActivity.this, android.R.layout.select_dialog_item, numbers);
|
|
||||||
DialogInterface.OnClickListener l = new DialogInterface.OnClickListener() {
|
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
|
||||||
lc().transferCallToAnother(call, existingCalls.get(which));
|
|
||||||
}
|
|
||||||
};
|
|
||||||
new AlertDialog.Builder(ConferenceActivity.this).setAdapter(adapter, l).create().show();
|
|
||||||
break;
|
break;
|
||||||
case R.id.transfer_new:
|
case R.id.transfer_new:
|
||||||
Intent intent = new Intent().setClass(ConferenceActivity.this, UriPickerActivity.class);
|
Intent intent = new Intent().setClass(ConferenceActivity.this, UriPickerActivity.class);
|
||||||
|
@ -429,6 +461,7 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
}
|
}
|
||||||
|
|
||||||
public View getView(int position, View v, ViewGroup parent) {
|
public View getView(int position, View v, ViewGroup parent) {
|
||||||
|
Log.i("ConferenceActivity.getView(",position,") out of ", linphoneCalls.size());
|
||||||
if (v == null) {
|
if (v == null) {
|
||||||
if (Version.sdkAboveOrEqual(Version.API06_ECLAIR_20)) {
|
if (Version.sdkAboveOrEqual(Version.API06_ECLAIR_20)) {
|
||||||
v = getLayoutInflater().inflate(R.layout.conf_callee, null);
|
v = getLayoutInflater().inflate(R.layout.conf_callee, null);
|
||||||
|
@ -542,7 +575,7 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
ImageView pictureView = (ImageView) v.findViewById(R.id.picture);
|
ImageView pictureView = (ImageView) v.findViewById(R.id.picture);
|
||||||
if (numberOfCalls != 1) {
|
if (numberOfCalls != 1) {
|
||||||
// May be greatly sped up using a drawable cache
|
// May be greatly sped up using a drawable cache
|
||||||
Uri uri = LinphoneUtils.findUriPictureOfContactAndSetDisplayName(call.getRemoteAddress(), getContentResolver());
|
Uri uri = LinphoneUtils.findUriPictureOfContactAndSetDisplayName(address, getContentResolver());
|
||||||
LinphoneUtils.setImagePictureFromUri(ConferenceActivity.this, pictureView, uri, R.drawable.unknown_person);
|
LinphoneUtils.setImagePictureFromUri(ConferenceActivity.this, pictureView, uri, R.drawable.unknown_person);
|
||||||
pictureView.setVisibility(VISIBLE);
|
pictureView.setVisibility(VISIBLE);
|
||||||
} else {
|
} else {
|
||||||
|
@ -571,13 +604,14 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
|
|
||||||
private Handler mHandler = new Handler();
|
private Handler mHandler = new Handler();
|
||||||
|
|
||||||
private void updateMergeButtonState() {
|
private void updateSimpleControlButtons() {
|
||||||
|
LinphoneCall activeCall = lc().getCurrentCall();
|
||||||
|
View controlLayout = findViewById(R.id.conf_control_buttons);
|
||||||
int callNb = lc().getCallsNb();
|
int callNb = lc().getCallsNb();
|
||||||
int confSize = lc().getConferenceSize();
|
boolean hide = activeCall == null || callNb !=2 || lc().getConferenceSize() > 0;
|
||||||
if (lc().isInConference()) confSize--;
|
controlLayout.setVisibility(hide ? GONE : VISIBLE);
|
||||||
boolean showSimpleActions = callNb >= 2 && confSize != callNb;
|
|
||||||
findViewById(R.id.conf_simple_merge).setVisibility(showSimpleActions ? VISIBLE : GONE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCallStateChanged(final LinphoneCall call, final State state,
|
public void onCallStateChanged(final LinphoneCall call, final State state,
|
||||||
final String message) {
|
final String message) {
|
||||||
final String stateStr = call + " " + state.toString();
|
final String stateStr = call + " " + state.toString();
|
||||||
|
@ -586,7 +620,7 @@ public class ConferenceActivity extends ListActivity implements
|
||||||
public void run() {
|
public void run() {
|
||||||
CalleeListAdapter adapter = (CalleeListAdapter) getListAdapter();
|
CalleeListAdapter adapter = (CalleeListAdapter) getListAdapter();
|
||||||
Log.d("ConferenceActivity applying state ",stateStr);
|
Log.d("ConferenceActivity applying state ",stateStr);
|
||||||
updateMergeButtonState();
|
updateSimpleControlButtons();
|
||||||
updateCalleeImage();
|
updateCalleeImage();
|
||||||
if (state == State.IncomingReceived || state == State.OutgoingRinging) {
|
if (state == State.IncomingReceived || state == State.OutgoingRinging) {
|
||||||
if (!adapter.linphoneCalls.contains(call)) {
|
if (!adapter.linphoneCalls.contains(call)) {
|
||||||
|
|
|
@ -22,8 +22,11 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.linphone.core.LinphoneAddress;
|
import org.linphone.core.LinphoneAddress;
|
||||||
|
import org.linphone.core.LinphoneCall;
|
||||||
|
import org.linphone.core.LinphoneCore;
|
||||||
import org.linphone.core.Log;
|
import org.linphone.core.Log;
|
||||||
import org.linphone.mediastream.Version;
|
import org.linphone.mediastream.Version;
|
||||||
import org.linphone.mediastream.video.capture.hwconf.Hacks;
|
import org.linphone.mediastream.video.capture.hwconf.Hacks;
|
||||||
|
@ -124,5 +127,9 @@ public final class LinphoneUtils {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static final List<LinphoneCall> getLinphoneCalls(LinphoneCore lc) {
|
||||||
|
return (List<LinphoneCall>) lc.getCalls();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -522,12 +522,12 @@ class LinphoneCoreImpl implements LinphoneCore {
|
||||||
public synchronized void terminateAllCalls() {
|
public synchronized void terminateAllCalls() {
|
||||||
terminateAllCalls(nativePtr);
|
terminateAllCalls(nativePtr);
|
||||||
}
|
}
|
||||||
private native long getCall(long nativePtr, int position);
|
private native Object getCall(long nativePtr, int position);
|
||||||
@SuppressWarnings("unchecked") public synchronized List getCalls() {
|
@SuppressWarnings("unchecked") public synchronized List getCalls() {
|
||||||
int size = getCallsNb(nativePtr);
|
int size = getCallsNb(nativePtr);
|
||||||
List<LinphoneCall> calls = new ArrayList<LinphoneCall>(size);
|
List<LinphoneCall> calls = new ArrayList<LinphoneCall>(size);
|
||||||
for (int i=0; i < size; i++) {
|
for (int i=0; i < size; i++) {
|
||||||
calls.add(new LinphoneCallImpl(getCall(nativePtr, i)));
|
calls.add((LinphoneCall)getCall(nativePtr, i));
|
||||||
}
|
}
|
||||||
return calls;
|
return calls;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit b7dacbd01a6a9f84560033413f000597f469a718
|
Subproject commit 490945660d975abd2520f92a95ef781b1eaff7e3
|
Loading…
Reference in a new issue