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)) {
|
|| TelephonyManager.EXTRA_STATE_RINGING.equals(extraState)) {
|
||||||
LinphoneManager.getInstance().setCallGsmON(true);
|
LinphoneManager.getInstance().setCallGsmON(true);
|
||||||
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
Core lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
|
||||||
lc.pauseAllCalls();
|
if (lc != null) {
|
||||||
|
lc.pauseAllCalls();
|
||||||
|
}
|
||||||
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {
|
} else if (TelephonyManager.EXTRA_STATE_IDLE.equals(extraState)) {
|
||||||
LinphoneManager.getInstance().setCallGsmON(false);
|
LinphoneManager.getInstance().setCallGsmON(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue