Fix transfer and add call
This commit is contained in:
parent
f3143bc887
commit
7596f7300b
3 changed files with 23 additions and 14 deletions
|
@ -89,7 +89,7 @@
|
|||
<activity android:name="org.linphone.InCallActivity"
|
||||
android:theme="@style/FullScreen"
|
||||
android:noHistory="true"
|
||||
android:launchMode="singleInstance">
|
||||
android:launchMode="singleTop">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
</intent-filter>
|
||||
|
|
|
@ -41,7 +41,6 @@ import android.content.Intent;
|
|||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.net.Uri;
|
||||
import android.opengl.Visibility;
|
||||
import android.os.Bundle;
|
||||
import android.os.CountDownTimer;
|
||||
import android.os.Handler;
|
||||
|
|
|
@ -1248,6 +1248,7 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
selectMenu(newFragment);
|
||||
}
|
||||
} else if (resultCode == Activity.RESULT_FIRST_USER && requestCode == CALL_ACTIVITY) {
|
||||
getIntent().putExtra("PreviousActivity", CALL_ACTIVITY);
|
||||
boolean callTransfer = data == null ? false : data.getBooleanExtra("Transfer", false);
|
||||
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
||||
initInCallMenuLayout(callTransfer);
|
||||
|
@ -1259,6 +1260,12 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPause() {
|
||||
getIntent().putExtra("PreviousActivity", 0);
|
||||
super.onPause();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
|
@ -1279,12 +1286,14 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
|
||||
LinphoneManager.getInstance().changeStatusToOnline();
|
||||
|
||||
if(getIntent().getIntExtra("PreviousActivity", 0) != CALL_ACTIVITY){
|
||||
if (LinphoneManager.getLc().getCalls().length > 0) {
|
||||
LinphoneCall call = LinphoneManager.getLc().getCalls()[0];
|
||||
LinphoneCall.State callState = call.getState();
|
||||
if (callState == State.IncomingReceived) {
|
||||
startActivity(new Intent(this, IncomingCallActivity.class));
|
||||
} else {
|
||||
|
||||
if (call.getCurrentParamsCopy().getVideoEnabled()) {
|
||||
startVideoActivity(call);
|
||||
} else {
|
||||
|
@ -1293,6 +1302,7 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
|
|
Loading…
Reference in a new issue