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 |   18 ++++++++++++------
 1 files changed, 12 insertions(+), 6 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 ce44248..24a01d8 100644
--- a/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
+++ b/HDLLinphoneSDKDemoNew/HDLLinphoneSDK/src/main/java/com/hdl/hdllinphonesdk/HDLLinphoneKit.java
@@ -150,7 +150,7 @@
             @Override
             public void callEnd() {
                 super.callEnd();
-                context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY));
+//                context.sendBroadcast(new Intent(HDLLinphoneIntercomActivity.RECEIVE_FINISH_VIDEO_ACTIVITY));
 
             }
         });
@@ -275,9 +275,6 @@
                         config.done();
                     }
                 }
-                core.clearAllAuthInfo();//娓呴櫎鎵�鏈夎璇佷俊鎭��
-
-//                core.clearProxyConfig();//浠庨厤缃腑鍒犻櫎鎵�鏈変唬鐞嗐�傛敞鎰忥細鐩墠涓嶈兘鐩存帴鍒犳墍鏈変唬鐞嗭紝鍥犱负鏈嶅姟鍣ㄤ笂杩樻槸鏍囪宸叉敞鍐�
             }
         } catch (Exception e) {
             e.printStackTrace();
@@ -290,6 +287,7 @@
     public void clearProxyConfig(){
         Core core = HDLLinphoneService.getCore();
         if (core != null) {
+            core.setDefaultProxyConfig(null);
             core.clearAllAuthInfo();//娓呴櫎鎵�鏈夎璇佷俊鎭��
             core.clearProxyConfig();//浠庨厤缃腑鍒犻櫎鎵�鏈変唬鐞嗐��
         }
@@ -559,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