Fix bad status message on return from video call
This commit is contained in:
parent
cada9999f6
commit
79bf306a4f
3 changed files with 20 additions and 2 deletions
|
@ -420,4 +420,18 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onResume() {
|
||||||
|
// When coming back from a video call, if the phone orientation is different
|
||||||
|
// Android will destroy the previous Dialer and create a new one.
|
||||||
|
// Unfortunately the "call end" status event is received in the meanwhile
|
||||||
|
// and set to the to be destroyed Dialer.
|
||||||
|
// Note1: We wait as long as possible before setting the last message.
|
||||||
|
// Note2: Linphone service is in charge of instantiating LinphoneManager
|
||||||
|
if (LinphoneService.isReady()) {
|
||||||
|
mStatus.setText(LinphoneManager.getInstance().getLastLcStatusMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onResume();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -111,6 +111,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
private LinphoneCore mLc;
|
private LinphoneCore mLc;
|
||||||
private static Transports initialTransports;
|
private static Transports initialTransports;
|
||||||
private static LinphonePreferenceManager lpm;
|
private static LinphonePreferenceManager lpm;
|
||||||
|
private String lastLcStatusMessage;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -626,9 +627,12 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
||||||
LinphoneAddress from, String message) {}
|
LinphoneAddress from, String message) {}
|
||||||
|
|
||||||
|
|
||||||
|
public String getLastLcStatusMessage() {
|
||||||
|
return lastLcStatusMessage;
|
||||||
|
}
|
||||||
public void displayStatus(final LinphoneCore lc, final String message) {
|
public void displayStatus(final LinphoneCore lc, final String message) {
|
||||||
Log.i(message);
|
Log.i(message);
|
||||||
|
lastLcStatusMessage=message;
|
||||||
serviceListener.onDisplayStatus(message);
|
serviceListener.onDisplayStatus(message);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 338884fa4d64a59e30697de8fc68b1e84b7ca504
|
Subproject commit 928e9717531c342ec38b00a66dd7fe1f77fd8909
|
Loading…
Reference in a new issue