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