From e3541a31b314573a80400dd9b7ef8a9bc88f610b Mon Sep 17 00:00:00 2001
From: JLChen <551775569@qq.com>
Date: 星期二, 24 八月 2021 14:38:04 +0800
Subject: [PATCH] 2021-08-24 1.更新

---
 HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
index a421c7a..24a01d8 100644
--- a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
+++ b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
@@ -557,14 +557,22 @@
      * 鑾峰彇褰撳墠閫氳瘽鐘舵��
      */
     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);
+        }
     }
 
     /**

--
Gitblit v1.8.0