Fix add call issue, numpad issue and videoCall FC
This commit is contained in:
parent
b13bf1d05b
commit
5565ce11d0
4 changed files with 62 additions and 34 deletions
|
@ -47,6 +47,32 @@
|
|||
android:src="@drawable/startcall_green"
|
||||
android:background="@drawable/clavier_bg" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/InCallControls"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:orientation="horizontal"
|
||||
android:visibility="gone"
|
||||
android:layout_weight="3" >
|
||||
|
||||
<Button
|
||||
android:id="@+id/AddCall"
|
||||
style="@style/DialerDigit"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/AddCallButtonText" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/Back"
|
||||
style="@style/DialerDigit"
|
||||
android:layout_height="fill_parent"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/CancelButtonText" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
|
|
@ -222,6 +222,38 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
|
|||
mInCallControls = (LinearLayout) findViewById(R.id.InCallControls);
|
||||
mStatus = (TextView) findViewById(R.id.status_label);
|
||||
|
||||
if (mBack != null) {
|
||||
mBack.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||
if (call.getCurrentParamsCopy().getVideoEnabled())
|
||||
LinphoneActivity.instance().startVideoActivity(call, 0);
|
||||
else
|
||||
LinphoneActivity.instance().startIncallActivity();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (mAddCall != null) {
|
||||
mAddCall.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||
if (call != null && !call.isInConference()) {
|
||||
LinphoneManager.getLc().pauseCall(call);
|
||||
} else {
|
||||
LinphoneManager.getLc().leaveConference();
|
||||
}
|
||||
|
||||
try {
|
||||
LinphoneManager.getLc().invite(mAddress.getText().toString());
|
||||
} catch (LinphoneCoreException e) {
|
||||
Log.e(e);
|
||||
Toast.makeText(DialerActivity.this, R.string.error_adding_new_call, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (Version.isXLargeScreen(this)) {
|
||||
tryToInitTabletUI();
|
||||
}
|
||||
|
@ -304,38 +336,6 @@ public class DialerActivity extends Activity implements LinphoneGuiListener {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (mBack != null) {
|
||||
mBack.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||
if (call.getCurrentParamsCopy().getVideoEnabled())
|
||||
LinphoneActivity.instance().startVideoActivity(call, 0);
|
||||
else
|
||||
LinphoneActivity.instance().startIncallActivity();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (mAddCall != null) {
|
||||
mAddCall.setOnClickListener(new OnClickListener() {
|
||||
public void onClick(View v) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCurrentCall();
|
||||
if (call != null && !call.isInConference()) {
|
||||
LinphoneManager.getLc().pauseCall(call);
|
||||
} else {
|
||||
LinphoneManager.getLc().leaveConference();
|
||||
}
|
||||
|
||||
try {
|
||||
LinphoneManager.getLc().invite(mAddress.getText().toString());
|
||||
} catch (LinphoneCoreException e) {
|
||||
Log.e(e);
|
||||
Toast.makeText(DialerActivity.this, R.string.error_adding_new_call, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void checkIfOutgoingCallIntentReceived() {
|
||||
|
|
|
@ -201,7 +201,9 @@ public class VideoCallActivity extends Activity implements
|
|||
// Hack to force the redraw of the preview
|
||||
// Camera will be re-enabled in onResume just after anyway
|
||||
shouldRestartVideoOnResume = true;
|
||||
LinphoneManager.getLc().getCurrentCall().enableCamera(false);
|
||||
LinphoneCall currentCall = LinphoneManager.getLc().getCurrentCall();
|
||||
if (currentCall != null)
|
||||
currentCall.enableCamera(false);
|
||||
}
|
||||
|
||||
void updateQualityOfSignalIcon(float quality) {
|
||||
|
|
|
@ -105,7 +105,7 @@ public class Digit extends Button implements AddressAware {
|
|||
mIsDtmfStarted =false;
|
||||
if (lc.isIncall()) {
|
||||
lc.sendDtmf(mKeyCode.charAt(0));
|
||||
return;
|
||||
// return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue