| | |
| | | * 获取当前通话状态 |
| | | */ |
| | | public Call.State getCallState() { |
| | | return HDLLinphoneService.getInstance().getCurrentCallState(); |
| | | if(HDLLinphoneService.getInstance() == null) { |
| | | return null; |
| | | }else { |
| | | return HDLLinphoneService.getInstance().getCurrentCallState(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 获取当前通话状态是否为来电中 |
| | | */ |
| | | public boolean isIncomingReceivedCallState() { |
| | | return HDLLinphoneService.getInstance().getCurrentCallState() == Call.State.IncomingReceived; |
| | | if(HDLLinphoneService.getInstance() == null || HDLLinphoneService.getInstance().getCurrentCallState() == null){ |
| | | return false; |
| | | }else{ |
| | | return (HDLLinphoneService.getInstance().getCurrentCallState() == Call.State.IncomingReceived); |
| | | } |
| | | } |
| | | |
| | | /** |