It seems the case where the lc is null can happen
This commit is contained in:
parent
076c4a7c31
commit
7ca84288ed
1 changed files with 3 additions and 1 deletions
|
@ -38,7 +38,9 @@ public class PhoneStateChangedReceiver extends BroadcastReceiver {
|
|||
|| TelephonyManager.EXTRA_STATE_RINGING.equals(extraState)) {
|
||||
LinphoneManager.getInstance().setCallGsmON(true);
|
||||
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||
if (lc != null) {
|
||||
lc.pauseAllCalls();
|
||||
}
|
||||
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {
|
||||
LinphoneManager.getInstance().setCallGsmON(false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue