From 85ea6e4d86345d4d23acb2d86bb71cc5a8591d48 Mon Sep 17 00:00:00 2001
From: 陈嘉乐 <cjl@hdlchina.com.cn>
Date: 星期三, 12 八月 2020 16:15:24 +0800
Subject: [PATCH] 2020-08-12-1

---
 ZigbeeApp/GateWay.Droid/VideoActivity.cs |   33 ++++++++++++++++++++++++++++++---
 1 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/ZigbeeApp/GateWay.Droid/VideoActivity.cs b/ZigbeeApp/GateWay.Droid/VideoActivity.cs
index a24392e..effdc18 100644
--- a/ZigbeeApp/GateWay.Droid/VideoActivity.cs
+++ b/ZigbeeApp/GateWay.Droid/VideoActivity.cs
@@ -165,9 +165,32 @@
         {
             if (v.Equals(ivBack))
             {
-                this.Finish();
+                try
+                {
+                    //if (mPhone != null)
+                    //    mPhone.HangUp();
+                    //else
+                        this.Finish();
+                }
+                catch (Exception e) { string error = e.Message; }
             }
-        }      
+        }
+
+        public override void OnBackPressed()
+        {
+            try
+            {
+                bool ssss=mPhone.IsCalling;
+                if (mPhone != null)
+                    mPhone.HangUp();
+                else
+                    this.Finish();
+            }
+            catch (Exception e)
+            {
+                string error = e.Message;
+            }
+        }
 
         //涓嶈兘鐢╒iew.INVISIBLE鏉ュ畬鍏ㄩ殣钘�,鍚﹀垯MediaCodec.configure浼氭姤ava.lang.IllegalArgumentException: The surface has been released
         //[Obsolete]
@@ -325,7 +348,11 @@
                         hideRemoteVideo();
                         if (mPhone != null)
                         {
-                            mPhone.StopStream();
+                            try
+                            {
+                                mPhone.StopStream();
+                            }
+                            catch { }
                         }
                         showTipDialog("鎻愮ず","宸叉寕鏂�","纭");
                         break;

--
Gitblit v1.8.0