weizhengliang 3 rokov pred
rodič
commit
69f15c6dfe

+ 3 - 3
app/build.gradle

@@ -106,9 +106,9 @@ dependencies {
     //testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.1'
 
     // debugImplementation because LeakCanary should only run in debug builds.
-    debugImplementation ('com.squareup.leakcanary:leakcanary-android:2.4') {
-        exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
-    }
+    //debugImplementation ('com.squareup.leakcanary:leakcanary-android:2.4') {
+    //    exclude group: 'org.jetbrains.kotlin', module: 'kotlin-stdlib'
+    //}
 
     /**
      * Kotlin依赖

+ 2 - 0
app/keystore_kaer/readme.txt

@@ -0,0 +1,2 @@
+别名:kaer
+密码:111111

+ 2 - 2
gradle.properties

@@ -15,8 +15,8 @@
 # org.gradle.parallel=true
 #Wed Sep 27 17:07:24 CST 2017
 
-systemProp.http.proxyHost=mirrors.neusoft.edu.cn
-systemProp.http.proxyPort=80
+#systemProp.http.proxyHost=mirrors.neusoft.edu.cn
+#systemProp.http.proxyPort=80
 
 org.gradle.jvmargs=-XX\:MaxHeapSize\=4096m -Xmx4096m
 org.gradle.daemon=true

+ 22 - 10
nursehome/src/main/java/com/wdkl/ncs/android/component/nursehome/fragment/SkyCallFragment.kt

@@ -217,6 +217,10 @@ class SkyCallFragment: BaseCallFragment(), CallSession.CallSessionCallback {
     }
 
     private fun showCalling(audioOnly: Boolean) {
+        if (callEnded) {
+            return
+        }
+
         if (audioOnly) {
             //移除视频画面
             fullscreen_video_frame.visibility = View.GONE
@@ -352,15 +356,20 @@ class SkyCallFragment: BaseCallFragment(), CallSession.CallSessionCallback {
                 }
 
                 if (outGoing && remoteSurfaceView == null) {
-                    if (fullscreen_video_frame != null && fullscreen_video_frame.getChildCount() != 0) {
-                        fullscreen_video_frame.removeAllViews()
+                    if (fullscreen_video_frame != null) {
+                        if (fullscreen_video_frame.getChildCount() != 0) {
+                            fullscreen_video_frame.removeAllViews()
+                        }
+                        fullscreen_video_frame.addView(localSurfaceView)
                     }
-                    fullscreen_video_frame.addView(localSurfaceView)
+
                 } else {
-                    if (pip_video_frame != null && pip_video_frame.getChildCount() != 0) {
-                        pip_video_frame.removeAllViews()
+                    if (pip_video_frame != null) {
+                        if (pip_video_frame.getChildCount() != 0) {
+                            pip_video_frame.removeAllViews()
+                        }
+                        pip_video_frame.addView(localSurfaceView)
                     }
-                    pip_video_frame.addView(localSurfaceView)
                 }
             }
         }
@@ -379,14 +388,16 @@ class SkyCallFragment: BaseCallFragment(), CallSession.CallSessionCallback {
                         if (localSurfaceView!!.parent != null) {
                             (localSurfaceView!!.parent as ViewGroup).removeView(localSurfaceView)
                         }
-                        pip_video_frame!!.addView(localSurfaceView)
+                        if (pip_video_frame != null) {
+                            pip_video_frame.addView(localSurfaceView)
+                        }
                     }
                 }
 
                 //远端画面
                 val surfaceView = gEngineKit!!.currentSession.setupRemoteVideo(userId, false)
                 Log.e("dds", "didReceiveRemoteVideoTrack,surfaceView = $surfaceView")
-                if (surfaceView != null) {
+                if (surfaceView != null && fullscreen_video_frame != null) {
                     remoteSurfaceView = surfaceView as SurfaceViewRenderer
                     fullscreen_video_frame.removeAllViews()
                     if (remoteSurfaceView!!.parent != null) {
@@ -400,7 +411,7 @@ class SkyCallFragment: BaseCallFragment(), CallSession.CallSessionCallback {
 
     override fun didCallEndWithReason(callEndReason: EnumType.CallEndReason?) {
         handler.post {
-            when (callEndReason) {
+            /*when (callEndReason) {
                 EnumType.CallEndReason.Busy -> {
                     showMessage("对方忙线中")
                 }
@@ -428,8 +439,9 @@ class SkyCallFragment: BaseCallFragment(), CallSession.CallSessionCallback {
                 EnumType.CallEndReason.Timeout -> {
                     showMessage("对方未接听")
                 }
-            }
+            }*/
 
+            showMessage("通话结束")
             callEnd()
         }
     }