Use more elegant solution to prevent some activities to be in history
This commit is contained in:
parent
085ac38d53
commit
1ff00d7b79
5 changed files with 9 additions and 10 deletions
|
@ -73,6 +73,7 @@
|
|||
android:launchMode="singleTask"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/NoTitle"
|
||||
android:noHistory="true"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
@ -129,6 +130,7 @@
|
|||
<activity
|
||||
android:name=".call.CallIncomingActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:noHistory="true"
|
||||
android:theme="@style/NoTitle">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
@ -137,6 +139,7 @@
|
|||
<activity
|
||||
android:name=".call.CallOutgoingActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:noHistory="true"
|
||||
android:theme="@style/NoTitle">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
@ -145,6 +148,7 @@
|
|||
<activity
|
||||
android:name=".call.CallActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:noHistory="true"
|
||||
android:theme="@style/FullScreen">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
|
|
@ -1496,7 +1496,6 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
displayInapp();
|
||||
} else if (extras != null && extras.getBoolean("Notification", false)) {
|
||||
if (LinphoneManager.getLc().getCallsNb() > 0) {
|
||||
Call call = LinphoneManager.getLc().getCalls()[0];
|
||||
startIncallActivity();
|
||||
}
|
||||
} else if (extras != null && extras.getBoolean("StartCall", false)) {
|
||||
|
@ -1505,10 +1504,11 @@ public class LinphoneActivity extends LinphoneGenericActivity implements OnClick
|
|||
} else {
|
||||
mAddressWaitingToBeCalled = extras.getString("NumberToCall");
|
||||
goToDialerFragment();
|
||||
//startActivity(new Intent(this, CallIncomingActivity.class));
|
||||
}
|
||||
} else if (extras != null && extras.getBoolean("Transfer", false)) {
|
||||
intent.putExtra("DoNotGoToCallActivity", true);
|
||||
} else if (extras != null && extras.getBoolean("AddCall", false)) {
|
||||
intent.putExtra("DoNotGoToCallActivity", true);
|
||||
} else {
|
||||
DialerFragment dialerFragment = DialerFragment.instance();
|
||||
if (dialerFragment != null) {
|
||||
|
|
|
@ -167,7 +167,6 @@ public class LinphoneLauncherActivity extends Activity {
|
|||
LinphoneActivity.instance().displayChat(null, null, stringUriFileShared);
|
||||
}
|
||||
}
|
||||
finish();
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
|
|
|
@ -1043,9 +1043,9 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
|||
|
||||
public void goBackToDialer() {
|
||||
Intent intent = new Intent();
|
||||
intent.putExtra("Transfer", false);
|
||||
setResult(Activity.RESULT_FIRST_USER, intent);
|
||||
finish();
|
||||
intent.setClass(this, LinphoneActivity.class);
|
||||
intent.putExtra("AddCall", true);
|
||||
startActivity(intent);
|
||||
}
|
||||
|
||||
private void goBackToDialerAndDisplayTransferButton() {
|
||||
|
@ -1053,7 +1053,6 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
|||
intent.setClass(this, LinphoneActivity.class);
|
||||
intent.putExtra("Transfer", true);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
private void goToChatList() {
|
||||
|
@ -1061,7 +1060,6 @@ public class CallActivity extends LinphoneGenericActivity implements OnClickList
|
|||
intent.setClass(this, LinphoneActivity.class);
|
||||
intent.putExtra("GoToChat", true);
|
||||
startActivity(intent);
|
||||
finish();
|
||||
}
|
||||
|
||||
public void acceptCallUpdate(boolean accept) {
|
||||
|
|
|
@ -109,7 +109,6 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
|
|||
return;
|
||||
}
|
||||
LinphoneActivity.instance().startIncallActivity();
|
||||
finish();
|
||||
return;
|
||||
} else if (state == State.Error) {
|
||||
// Convert Core message for internalization
|
||||
|
@ -172,7 +171,6 @@ public class CallOutgoingActivity extends LinphoneGenericActivity implements OnC
|
|||
return;
|
||||
}
|
||||
LinphoneActivity.instance().startIncallActivity();
|
||||
finish();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue