陈嘉乐
2020-08-12 85ea6e4d86345d4d23acb2d86bb71cc5a8591d48
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;
            }
        }
        //不能用View.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;