when using onNewIntent make sure to store intent otherwise onBackground might just overwrite it again
This commit is contained in:
parent
609120c0d8
commit
deaa76b5ca
|
@ -141,7 +141,11 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
|
||||||
@Override
|
@Override
|
||||||
public void onNewIntent(final Intent intent) {
|
public void onNewIntent(final Intent intent) {
|
||||||
super.onNewIntent(intent);
|
super.onNewIntent(intent);
|
||||||
//TODO. deal with 'pending intent' in case background service isn’t here yet.
|
setIntent(intent);
|
||||||
|
if (xmppConnectionService == null) {
|
||||||
|
Log.d(Config.LOGTAG,"RtpSessionActivity: background service wasn't bound in onNewIntent()");
|
||||||
|
return;
|
||||||
|
}
|
||||||
final Account account = extractAccount(intent);
|
final Account account = extractAccount(intent);
|
||||||
final Jid with = Jid.of(intent.getStringExtra(EXTRA_WITH));
|
final Jid with = Jid.of(intent.getStringExtra(EXTRA_WITH));
|
||||||
final String sessionId = intent.getStringExtra(EXTRA_SESSION_ID);
|
final String sessionId = intent.getStringExtra(EXTRA_SESSION_ID);
|
||||||
|
@ -239,6 +243,9 @@ public class RtpSessionActivity extends XmppActivity implements XmppConnectionSe
|
||||||
finish();
|
finish();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (currentState == RtpEndUserState.INCOMING_CALL) {
|
||||||
|
getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
}
|
||||||
if (JingleRtpConnection.STATES_SHOWING_ONGOING_CALL.contains(requireRtpConnection().getState())) {
|
if (JingleRtpConnection.STATES_SHOWING_ONGOING_CALL.contains(requireRtpConnection().getState())) {
|
||||||
putScreenInCallMode();
|
putScreenInCallMode();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue