Browse Source

月子中心门口机版本完善

weizhengliang 7 months ago
parent
commit
ee5bdb9db2
26 changed files with 2033 additions and 2272 deletions
  1. 5 1
      android_bed/src/main/java/com/wdkl/app/ncs/callingbed/helper/PasswordDialogHelper.java
  2. 5 1
      android_bed/src/main/java/com/wdkl/app/ncs/callingbed/helper/ServerConfigDialogHelper.java
  3. 5 1
      android_host/src/main/java/com/wdkl/ncs/android/component/nursehome/util/PasswordDialogHelper.java
  4. 5 1
      android_host/src/main/java/com/wdkl/ncs/android/component/nursehome/util/ServerConfigDialogHelper.java
  5. 2 3
      android_mobile/src/main/java/com/wdkl/ncs/android/component/home/util/PasswordDialogHelper.java
  6. 2 3
      android_mobile/src/main/java/com/wdkl/ncs/android/component/home/util/ServerConfigDialogHelper.java
  7. 5 1
      android_visiting/src/main/java/com/wdkl/ncs/android/component/home/util/ServerConfigDialogHelper.java
  8. 25 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/AppUpdateActivity.kt
  9. 50 29
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivationActivity.kt
  10. 10 66
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt
  11. 2 4
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/SystemActivity.kt
  12. 10 2
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/SystemDialogHelper.java
  13. 90 26
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/MomFragment.kt
  14. 0 228
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AnrFcExceptionUtil.java.bak
  15. 20 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AppUpdateHelper.java
  16. 1 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/NetHelper.java
  17. 7 5
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/PasswordDialogHelper.java
  18. 5 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/ServerConfigDialogHelper.java
  19. 7 8
      callingdoor/src/main/res/layout-land/callingdoor_activation.xml
  20. 601 647
      callingdoor/src/main/res/layout-land/callingdoor_setting_main.xml
  21. 405 436
      callingdoor/src/main/res/layout/calling_babymom_main.xml
  22. 161 162
      callingdoor/src/main/res/layout/callingdoor_activation.xml
  23. 1 2
      callingdoor/src/main/res/layout/callingdoor_main_new.xml
  24. 587 642
      callingdoor/src/main/res/layout/callingdoor_setting_main.xml
  25. 1 0
      callingdoor/src/main/res/layout/password_dialog_lay.xml
  26. 21 1
      middleware/src/main/code/com/wdkl/ncs/android/middleware/utils/AppUtil.java

+ 5 - 1
android_bed/src/main/java/com/wdkl/app/ncs/callingbed/helper/PasswordDialogHelper.java

@@ -25,6 +25,10 @@ public class PasswordDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity, final MyListener listener) {
+        if (dialog != null) {
+            dialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.password_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
@@ -117,7 +121,7 @@ public class PasswordDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (dialog != null && dialog.isShowing()) {
+        if (dialog != null) {
             dialog.dismiss();
         }
     }

+ 5 - 1
android_bed/src/main/java/com/wdkl/app/ncs/callingbed/helper/ServerConfigDialogHelper.java

@@ -29,6 +29,10 @@ public class ServerConfigDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity) {
+        if (callDialog != null) {
+            callDialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.server_config_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
@@ -152,7 +156,7 @@ public class ServerConfigDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (callDialog != null && callDialog.isShowing()) {
+        if (callDialog != null) {
             callDialog.dismiss();
         }
     }

+ 5 - 1
android_host/src/main/java/com/wdkl/ncs/android/component/nursehome/util/PasswordDialogHelper.java

@@ -23,6 +23,10 @@ public class PasswordDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity, final ClickListener listener) {
+        if (dialog != null) {
+            dialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.password_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
@@ -111,7 +115,7 @@ public class PasswordDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (dialog != null && dialog.isShowing()) {
+        if (dialog != null) {
             dialog.dismiss();
         }
     }

+ 5 - 1
android_host/src/main/java/com/wdkl/ncs/android/component/nursehome/util/ServerConfigDialogHelper.java

@@ -29,6 +29,10 @@ public class ServerConfigDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity) {
+        if (callDialog != null) {
+            callDialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.server_config_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
@@ -152,7 +156,7 @@ public class ServerConfigDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (callDialog != null && callDialog.isShowing()) {
+        if (callDialog != null) {
             callDialog.dismiss();
         }
     }

+ 2 - 3
android_mobile/src/main/java/com/wdkl/ncs/android/component/home/util/PasswordDialogHelper.java

@@ -23,8 +23,8 @@ public class PasswordDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity, final ClickListener listener) {
-        if (dialog != null && dialog.isShowing()) {
-            return;
+        if (dialog != null) {
+            dialog.dismiss();
         }
 
         View contentView = LayoutInflater.from(activity).inflate(R.layout.password_dialog_lay, null);
@@ -117,7 +117,6 @@ public class PasswordDialogHelper {
         pwd = "";
         if (dialog != null) {
             dialog.dismiss();
-            dialog = null;
         }
     }
 

+ 2 - 3
android_mobile/src/main/java/com/wdkl/ncs/android/component/home/util/ServerConfigDialogHelper.java

@@ -29,8 +29,8 @@ public class ServerConfigDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity) {
-        if (dialog != null && dialog.isShowing()) {
-            return;
+        if (dialog != null) {
+            dialog.dismiss();
         }
 
         View contentView = LayoutInflater.from(activity).inflate(R.layout.server_config_dialog_lay, null);
@@ -158,7 +158,6 @@ public class ServerConfigDialogHelper {
         pwd = "";
         if (dialog != null) {
             dialog.dismiss();
-            dialog = null;
         }
     }
 }

+ 5 - 1
android_visiting/src/main/java/com/wdkl/ncs/android/component/home/util/ServerConfigDialogHelper.java

@@ -29,6 +29,10 @@ public class ServerConfigDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity) {
+        if (callDialog != null) {
+            callDialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.server_config_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
@@ -152,7 +156,7 @@ public class ServerConfigDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (callDialog != null && callDialog.isShowing()) {
+        if (callDialog != null) {
             callDialog.dismiss();
         }
     }

+ 25 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/AppUpdateActivity.kt

@@ -6,6 +6,7 @@ import android.text.TextUtils
 import android.util.Log
 import com.enation.javashop.android.jrouter.external.annotation.Router
 import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.BuildConfig
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.databinding.UpdateLayBinding
 import com.wdkl.app.ncs.callingdoor.helper.AppUpdateHelper
@@ -74,6 +75,9 @@ class AppUpdateActivity :BaseActivity<AppUpdatePresenter, UpdateLayBinding>(), A
                     }
                     if ("rk3288".equals(Build.MODEL)) {
                         installApkForRk3288()
+                    } else if (BuildConfig.flag.equals(Constant.DEV_W_A133)) {
+                        //a133
+                        startInstallA133()
                     } else {
                         startInstallApk()
                     }
@@ -85,6 +89,9 @@ class AppUpdateActivity :BaseActivity<AppUpdatePresenter, UpdateLayBinding>(), A
                         installApkForRk3288()
                     } else if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
                         startInstallApk()
+                    } else if (BuildConfig.flag.equals(Constant.DEV_W_A133)) {
+                        //a133
+                        startInstallA133()
                     } else {
                         AppUpdateHelper.installAPK(activity)
                     }
@@ -127,6 +134,24 @@ class AppUpdateActivity :BaseActivity<AppUpdatePresenter, UpdateLayBinding>(), A
         }.start()
     }
 
+    fun startInstallA133() {
+        Thread {
+            AppUpdateHelper.updateAppA133(this, object : AppUpdateHelper.UpdateCallBack {
+                override fun onFailed() {
+                    runOnUiThread {
+                        showMessage(R.string.update_fail)
+                    }
+                }
+
+                override fun onSuccess() {
+                    runOnUiThread {
+                        showMessage(R.string.update_success)
+                    }
+                }
+            })
+        }.start()
+    }
+
 
     fun installApkForRk3288() {
         val path = AppUpdateHelper.FILE_APK_PATH + "/" + AppUpdateHelper.FILE_APK_NAME

+ 50 - 29
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivationActivity.kt

@@ -1,8 +1,6 @@
- package com.wdkl.app.ncs.callingdoor.activity
+package com.wdkl.app.ncs.callingdoor.activity
 
-import android.content.Context
 import android.content.Intent
-import android.content.res.Configuration
 import android.net.Uri
 import android.os.Build
 import android.os.Handler
@@ -15,12 +13,9 @@ import com.enation.javashop.net.engine.config.NetEngineConfig
 import com.enation.javashop.net.engine.model.NetState
 import com.enation.javashop.net.engine.plugin.exception.RestfulExceptionInterceptor
 import com.enation.javashop.utils.base.config.BaseConfig
-import com.example.yf_rk3288_api.YF_RK3288_API_Manager
 import com.wdkl.app.ncs.callingdoor.BuildConfig
-
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorActivationBinding
-import com.wdkl.app.ncs.callingdoor.dialog.RebootDialogHelper
 import com.wdkl.app.ncs.callingdoor.dialog.ServicesDialogHelper
 import com.wdkl.app.ncs.callingdoor.dialog.SystemDialogHelper
 import com.wdkl.app.ncs.callingdoor.hardware.HardWareFactroy
@@ -30,7 +25,6 @@ import com.wdkl.app.ncs.callingdoor.settings.SettingConfig
 import com.wdkl.app.ncs.callingdoor.util.SPUtils
 import com.wdkl.ncs.android.lib.base.BaseActivity
 import com.wdkl.ncs.android.lib.base.BaseApplication
-import com.wdkl.ncs.android.lib.utils.AppTool
 import com.wdkl.ncs.android.lib.utils.EcodeHelper
 import com.wdkl.ncs.android.lib.utils.showMessage
 import com.wdkl.ncs.android.lib.vo.filter
@@ -45,7 +39,6 @@ import com.wdkl.ncs.android.middleware.tcp.enums.DeviceTypeEnum
 import com.wdkl.ncs.android.middleware.udp.ServerInfoUtil
 import com.wdkl.ncs.android.middleware.utils.CommonUtils
 import kotlinx.android.synthetic.main.callingdoor_activation.*
-import kotlinx.android.synthetic.main.main_view_layout.*
 import okhttp3.OkHttpClient
 import okhttp3.Request
 import org.greenrobot.eventbus.Subscribe
@@ -69,15 +62,11 @@ class CallingdoorActivationActivity  : BaseActivity<CallingdoorActivationPresent
     //是否重启
     private var cancelRestart = false
 
+    private var clickTime: Long = 0
+    private var clickTimes: Int = 1
+
     override fun getLayId(): Int {
-//        val currentLanguage: String = Locale.getDefault().getLanguage()
-//        if (currentLanguage.equals("es")){
-//            return R.layout.callingdoor_activation
-//        }else{
-//
-//        }
         return R.layout.callingdoor_activation
-
     }
 
     override fun bindDagger() {
@@ -85,7 +74,19 @@ class CallingdoorActivationActivity  : BaseActivity<CallingdoorActivationPresent
     }
 
     override fun init() {
-        BaseConfig.getInstance().addActivity("WelcomeActivity", "AppUpdateActivity","CallingdoorActivity")
+        BaseConfig.getInstance().addActivity("WelcomeActivity",
+            "AppUpdateActivity",
+            "CallingdoorActivity",
+            "CallActivity",
+            "CallingdoorActivationActivity",
+            "DepartmentInfoActivity",
+            "DeviceSystemActivity",
+            "HospitalInfoActivity",
+            "SetHintActivity",
+            "SystemActivity",
+            "TextActivity",
+            "WebviewActivity")
+
         NetEngineConfig.init(baseContext)
                 .openLogger()
                 .addNetInterceptor(RestfulExceptionInterceptor())
@@ -104,32 +105,28 @@ class CallingdoorActivationActivity  : BaseActivity<CallingdoorActivationPresent
         //是否卸载旧版本apk
         HardWareFactroy.getHardTools().uninstallApp(this,uninstallApk,APP_NAME)
 
-        //anr catcher
-        //AnrFcExceptionUtil.getInstance(this).initFCException()
+        //注册方式
+        HardWareFactroy.getHardTools().Registration(this)
+
         //xCrash catcher
         XCrashUtils().init(application)
 
-
-
-
-
         showui()
 
-
         checkServer()
-
     }
 
     override fun bindEvent() {
         //设备重启
         activation_settings_button.setOnClickListener {
-            //RebootDialogHelper.showDialog(activity)
             AppUpdateHelper.restartApp(activity)
         }
+
         //系统设置
         activation_system_button.setOnClickListener {
             SystemDialogHelper.showDialog(activity,1)
         }
+
         //服务器设置
         activation_services_button.setOnClickListener {
             ServicesDialogHelper.showDialog(activity, object : ServicesDialogHelper.ClickListener {
@@ -138,11 +135,32 @@ class CallingdoorActivationActivity  : BaseActivity<CallingdoorActivationPresent
                 }
             })
         }
+
+        activation_language_button.setOnClickListener {
+            SystemDialogHelper.showDialog(activity,3)
+        }
+
+        activation_qr_code.setOnClickListener {
+            val time = System.currentTimeMillis()
+            if (time - clickTime < 1500) {
+                clickTimes++
+            } else {
+                clickTimes = 1
+            }
+
+            if (clickTimes > 15) {
+                showMessage("Reboot device!")
+                AppUpdateHelper.reboot(activity)
+                clickTimes = 1
+            }
+            clickTime = time
+        }
     }
 
     override fun destory() {
 
     }
+
     private fun showui(){
         //设置二维码
         setQrcode()
@@ -158,14 +176,17 @@ class CallingdoorActivationActivity  : BaseActivity<CallingdoorActivationPresent
             activation_title_msg.setText(R.string.str_set_active_param)
             activation_title.setTextColor(resources.getColor(R.color.white))
         }
-        //注册方式
-        HardWareFactroy.getHardTools().Registration(this)
 
         activation_v.text =  BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE + "_" + Build.MODEL
         activation_ip.text = NetHelper.getInstance().localIP
-        activation_wg.text = NetHelper.getInstance().gateway()
-        activation_ym.text= NetHelper.getInstance().getmask()
         activation_zcm.text=  Constant.DEVICE_REGISTER_ID
+
+        val netInfo = NetHelper.getNetInfo(activity)
+        if (netInfo != null) {
+            activation_wg.text = netInfo.gateway
+            activation_ym.text = netInfo.netMask
+        }
+
         val buildUrl = UrlManager.build()
         activation_fuq.text=   buildUrl.buyer.substringAfterLast("//").substringBefore(":")
         val currentLanguage: String = Locale.getDefault().getLanguage()

+ 10 - 66
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt

@@ -152,10 +152,9 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     override fun init() {
-        //presenter.loadTcpServerHost()
          if (BuildConfig.is_mom.toBoolean()){
-            mom_frame_new.visibility = View.VISIBLE
-        }else {
+             mom_frame_new.visibility = View.VISIBLE
+         } else {
              mom_frame_new.visibility = View.GONE
          }
 
@@ -186,6 +185,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         SpeechUtil.getInstance().setSpeechLoopCount(3)
 
         if (SettingConfig.getSipEnabled(activity)) {
+            view_title_layout_tv_point.visibility = View.VISIBLE
+
             linphoneManager = LinphoneManager.getInstance(BaseApplication.appContext)
             linphoneManager?.start()
             linphoneManager?.phoneCallback = object : PhoneCallback() {
@@ -687,45 +688,6 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             showCalls()
         }
 
-        //长按 版本号出现 (此处需要调整)
-//        app_version.setOnLongClickListener {
-//            AppInfoDialogHelper.showAppDialog(activity,
-//                { dialog, which -> AppUpdateHelper.reboot(activity) },
-//                { dialog, which ->
-//                    Constant.silentUpdate = false
-//                    checkAppVersion()
-//                }, { dialog, which ->
-//                    showMessage("debug enable")
-//                    openNetwrokDebug()
-//                })
-//
-//            return@setOnLongClickListener true
-//        }
-
-        //if ("rk3288".equals(Build.MODEL)) {
-//            app_version.setOnClickListener {
-//                if (System.currentTimeMillis() - clickVersionTime < 1500) {
-//                    clickCount++
-//                } else {
-//                    clickCount = 1
-//                }
-//
-//                if (clickCount == 5) {
-//                    showMessage(R.string.enter_settings_tips)
-//                }
-//
-//                if (clickCount > 7) {
-//                    clickCount = 1
-//                    AppTool.Setting.systemSetting(activity)
-//                }
-//                clickVersionTime = System.currentTimeMillis()
-//            }
-        //}
-
-//        //语言设置
-//        room_action_language_set.setOnClickListener {
-//            LanguageSetDialogHelper.showDialog(activity)
-//        }
     }
 
     //开启网络调试
@@ -826,31 +788,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     override fun setTcpServerHost(tcpSeverDTO: TcpSeverDTO) {
-        /*if (loaded) {
-            return
-        }
-        loaded = true
-
-        Constant.TCP_SERVER_URL = tcpSeverDTO.localIp
-        Constant.TCP_PORT = tcpSeverDTO.tcpPort
-        Constant.TCP_HEART_BEAT = tcpSeverDTO.readerIdleTime
 
-        //开启TCP连接
-        startTcp()
-        showMessage("tcp开始连接...host: " + Constant.TCP_SERVER_URL + ", port: " + Constant.TCP_PORT)
-
-        Thread(Runnable {
-            while (!initialized) {
-                runOnUiThread(Runnable {
-                    initDevice()
-                })
-                try {
-                    Thread.sleep(15000)
-                } catch (e: Exception) {
-                    //
-                }
-            }
-        }).start()*/
     }
 
     override fun setServerInfo(data: ServerInfo) {
@@ -1393,6 +1331,12 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                                     AppUpdateHelper.restartApp(activity)
                                 }
                             }
+                        } else if (tcpModel.action == TcpAction.DeviceAction.OPEN_DEBUG) {
+                            //打开调试
+                            AppUtil.openNetworkDebug()
+                        } else if (tcpModel.action == TcpAction.DeviceAction.REBOOT) {
+                            //设备重启
+                            AppUpdateHelper.reboot(activity)
                         }
                     } else if (tcpModel.action == TcpAction.DataAction.REFRESH) {
                         //重新加载数据

+ 2 - 4
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/SystemActivity.kt

@@ -170,11 +170,9 @@ class SystemActivity : BaseActivity<SystemActivityPresenter, CallingdoorSettingM
             //设备网关
             settings_main_8_tx.text = NetHelper.getInstance().gateway()
             val netInfo = NetHelper.getNetInfo(activity)
-            if (netInfo.dns1!=null){
+            if (netInfo != null){
                 //设备dns
-                settings_main_9_tx.text=netInfo.dns1+ NetHelper.getInstance().getmask()
-            }else{
-                settings_main_9_tx.text="0:0:0:0   "+ NetHelper.getInstance().getmask()
+                settings_main_9_tx.text=netInfo.dns1 + "/" + netInfo.netMask
             }
 
         } catch (e: Exception) {

+ 10 - 2
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/dialog/SystemDialogHelper.java

@@ -5,6 +5,7 @@ import android.app.AlertDialog;
 import android.app.zhyl.ZhylManager;
 import android.content.Intent;
 import android.content.res.Configuration;
+import android.net.wifi.WifiManager;
 import android.provider.Settings;
 import android.util.DisplayMetrics;
 import android.view.Gravity;
@@ -71,7 +72,7 @@ public class SystemDialogHelper {
                         Intent intent = new Intent();
                         intent.setClass(activity, SystemActivity.class);
                         activity.startActivity(intent);
-                    }else if (type==2){
+                    } else if (type==2){
                         //打开底部导航栏
                         HardWareFactroy.getHardTools().startbar(true);
 
@@ -84,7 +85,14 @@ public class SystemDialogHelper {
                         Intent intent = new Intent(Settings.ACTION_SETTINGS);
                         activity.startActivity(intent);
 
-                    }else {
+                    } else if (type == 3) {
+                        Intent intentWifi = new Intent(WifiManager.ACTION_PICK_WIFI_NETWORK); // WIFI网络
+                        intentWifi.putExtra("only_access_points", true);
+                        intentWifi.putExtra("extra_prefs_show_button_bar", true); // 展示返回按钮
+                        intentWifi.putExtra("extra_prefs_set_back_text", activity.getString(R.string.back_button_message)); // 设置文字
+                        intentWifi.putExtra("extra_prefs_set_next_text", ""); // 隐藏下一步的按钮
+                        activity.startActivityForResult(intentWifi, 1);
+                    } else {
                         Intent intent = new Intent();
                         intent.setClass(activity, SystemActivity.class);
                         activity.startActivity(intent);

+ 90 - 26
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/MomFragment.kt

@@ -1,22 +1,15 @@
 package com.wdkl.app.ncs.callingdoor.fragment
 
-
-import android.content.res.Configuration
-import android.os.Parcel
-import android.os.Parcelable
+import android.text.TextUtils
 import android.view.View
-import androidx.recyclerview.widget.GridLayoutManager
-import androidx.recyclerview.widget.LinearLayoutManager
 import com.enation.javashop.net.engine.model.NetState
+import com.wdkl.app.ncs.callingdoor.BuildConfig
 import com.wdkl.app.ncs.callingdoor.R
-import com.wdkl.app.ncs.callingdoor.activity.CallingdoorActivity
-import com.wdkl.app.ncs.callingdoor.adapter.YhMianAdapter
+import com.wdkl.app.ncs.callingdoor.bean.CallingItem
 import com.wdkl.app.ncs.callingdoor.databinding.CallingBabymomMainBinding
-import com.wdkl.app.ncs.callingdoor.databinding.CallingdoorNurseBinding
-import com.wdkl.app.ncs.callingdoor.dialog.ExitHuliDialogHelper
 import com.wdkl.app.ncs.callingdoor.dialog.SystemDialogHelper
 import com.wdkl.app.ncs.callingdoor.launch.CallingdoorLaunch
-import com.wdkl.app.ncs.callingdoor.util.SPUtils
+import com.wdkl.app.ncs.callingdoor.settings.SettingConfig
 import com.wdkl.ncs.android.lib.base.BaseFragment
 import com.wdkl.ncs.android.lib.utils.TimeHandle
 import com.wdkl.ncs.android.lib.utils.showMessage
@@ -24,23 +17,19 @@ import com.wdkl.ncs.android.lib.vo.filter
 import com.wdkl.ncs.android.middleware.common.Constant
 import com.wdkl.ncs.android.middleware.common.MessageEvent
 import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.MainFragmentContract
-import com.wdkl.ncs.android.middleware.logic.contract.callingdoor.YhFragmentContract
 import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.MainFragmentPresenter
-import com.wdkl.ncs.android.middleware.logic.presenter.callingdoor.YhFragmentPresenter
-import com.wdkl.ncs.android.middleware.model.vo.ClerkByVO
 import com.wdkl.ncs.android.middleware.model.vo.FrameBedRelativeVO
 import com.wdkl.ncs.android.middleware.model.vo.FrameBedVO
 import com.wdkl.ncs.android.middleware.model.vo.FrameRoomVO
-import com.wdkl.ncs.android.middleware.tcp.channel.YhUtil
 import kotlinx.android.synthetic.main.calling_babymom_main.*
-import kotlinx.android.synthetic.main.callingdoor_main_new.*
-import kotlinx.android.synthetic.main.callingdoor_main_new.menu_medical_care
-import kotlinx.android.synthetic.main.callingdoor_nurse.*
 import kotlinx.android.synthetic.main.view_title_layout.*
 import org.greenrobot.eventbus.EventBus
 import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
-
+import java.util.*
+import java.util.concurrent.Executors
+import java.util.concurrent.TimeUnit
+import kotlin.collections.ArrayList
 
 /**
  * 月子中心界面
@@ -56,15 +45,20 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
     override fun getLayId(): Int {
         return R.layout.calling_babymom_main
     }
+
     override fun bindDagger() {
         CallingdoorLaunch.component.inject(this)
     }
+
     //数据绑定
     override fun init() {
         updateInfo()
         showui()
+        updateTcpNetStatus()
 
+        startScheduledExecutor()
     }
+
     //点击事件
     override fun bindEvent() {
         //进入系统设置
@@ -74,6 +68,22 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
 
     }
 
+    private fun startScheduledExecutor() {
+        val timerTask: TimerTask = object : TimerTask() {
+            override fun run() {
+                try {
+                    activity.runOnUiThread {
+                        updateTcpNetStatus()
+                    }
+                } catch (e: Exception) {
+                    //
+                }
+            }
+        }
+        val executor = Executors.newSingleThreadScheduledExecutor()
+        executor.scheduleAtFixedRate(timerTask, 100, 80, TimeUnit.SECONDS)
+    }
+
     fun updateInfo() {
         if (Constant.FRAME_ID != -1 && Constant.DEVICE_STATUS == 1) {
             presenter.loadRoomFrameInfo(Constant.FRAME_ID)
@@ -81,6 +91,10 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
     }
 
     private fun showui(){
+        if (SettingConfig.getSipEnabled(activity)) {
+            view_title_layout_tv_point.visibility = View.VISIBLE
+        }
+
         mom_view_title_layout_tv_hospital_name.text = Constant.partDisplay
         mom_view_title_layout_img.visibility = View.GONE
         mom_view_title_layout_tv_no.visibility = View.GONE
@@ -98,18 +112,35 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
             mom_view_title_layout_iv_ethernet.visibility = View.VISIBLE
              mom_view_title_layout_iv_ethernet.setImageResource(R.mipmap.ic_ethernet_fail)
         }
+
+        babymom_main_version.text = "V" + BuildConfig.VERSION_NAME + "_" + BuildConfig.VERSION_CODE
+    }
+
+    private fun updateTcpNetStatus() {
         //蓝牙图标
         if ( Constant.BT_state == 0){
-            mom_view_title_layout_iv_bt.setImageResource(R.mipmap.ic_bt_fail)
+            mom_view_title_layout_iv_bt.visibility = View.VISIBLE
+            mom_view_title_layout_iv_bt.setImageResource(R.mipmap.lanya_b)
+        } else {
+            mom_view_title_layout_iv_bt.visibility = View.GONE
         }
+
         //白天/黑夜
         if (Constant.day_state == 0){
             mom_view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_daylight_w)
         }else{
             mom_view_title_layout_iv_day_night.setImageResource(R.mipmap.ic_night_w)
         }
-        mom_view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_fail)
+
+        if (Constant.TCP_CONNECTED) {
+            mom_view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_fail)
+            mom_view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_w)
+        } else {
+            mom_view_title_layout_iv_tcp.setImageResource(R.mipmap.ic_tcp_success)
+            mom_view_title_layout_tv_point.setBackgroundResource(R.mipmap.sip_b)
+        }
     }
+
     /**执行其他销毁操作*/
     override fun destory() {
 
@@ -125,8 +156,10 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
 
                 try {
                     val bedVO = bedList[0]
-                    babymom_mian_name.text = bedVO.customerName
-                    babymom_mian_age.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
+                    if (!TextUtils.isEmpty(bedVO.customerName)) {
+                        babymom_mian_name.text = bedVO.customerName
+                        babymom_mian_age.text = "" + bedVO.customerAge + bedVO.customerAgeUnit
+                    }
 
                     if (bedVO.customerInDate != null) {
                         babymom_mian_time_out.text = getString(R.string.door_mom_main_1) + TimeHandle.getDateTime(bedVO.customerInDate * 1000L, "yyyy年MM月dd日")
@@ -191,6 +224,7 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
                             babymom_mian_title_tx.setBackgroundResource(R.drawable.shape_baby_bg_title)
                             babymom_mian_title_tx1.setBackgroundResource(R.drawable.shape_baby_bg_title2)
                             babymom_mian_title_tx2.setBackgroundResource(R.drawable.shape_baby_bg_title2)
+                            mom_view_title_layout_tv_hospital_name.setTextColor(resources.getColor(R.color.title_text))
                             if (babyList.size == 1) {
                                 baby_img.visibility = View.INVISIBLE
                                 baby_img2.setBackgroundResource(R.mipmap.nv)
@@ -203,7 +237,7 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
                         val hasSexEqualOnes = babyList.any { it.relativeSex == 1 }
                         val hasSexEqualTwo = babyList.any { it.relativeSex == 0 }
 
-                        if (babyList.size != 1 && allSexEqualOne) {
+                        if (babyList.size > 1 && allSexEqualOne) {
                             calling_door_babymom_mian.setBackgroundResource(R.color.mom_main_color)
                             babymom_mian_top_txt.setTextColor(resources.getColor(R.color.mom_main_color))
                             babymom_mian_top.setBackgroundResource(R.drawable.shape_baby_top_bg)
@@ -216,13 +250,15 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
                             baby_img2.setBackgroundResource(R.mipmap.nan_right)
                             return
                         }
-                        if (babyList.size != 1 && allSexEqualTwo) {
+
+                        if (babyList.size > 1 && allSexEqualTwo) {
                             baby_img.visibility = View.VISIBLE
                             baby_img.setBackgroundResource(R.mipmap.nv_left)
                             baby_img2.setBackgroundResource(R.mipmap.nv)
                             return
                         }
-                        if (babyList.size != 1 && hasSexEqualOnes) {
+
+                        if (babyList.size > 1 && hasSexEqualOnes) {
                             baby_img.visibility = View.VISIBLE
                             baby_img.setBackgroundResource(R.mipmap.nv_left)
                             baby_img2.setBackgroundResource(R.mipmap.nan_right)
@@ -236,6 +272,20 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
         }
     }
 
+    override fun onStart() {
+        if (!EventBus.getDefault().isRegistered(this)) {
+            EventBus.getDefault().register(this)
+        }
+        super.onStart()
+    }
+
+    override fun onStop() {
+        if (EventBus.getDefault().isRegistered(this)) {
+            EventBus.getDefault().unregister(this)
+        }
+        super.onStop()
+    }
+
 
     override fun onNoNet() {
 
@@ -264,4 +314,18 @@ class  MomFragment : BaseFragment<MainFragmentPresenter, CallingBabymomMainBindi
         })
     }
 
+
+    @Subscribe(threadMode = ThreadMode.MAIN)
+    fun onMoonEvent(messageEvent: MessageEvent) {
+        when (messageEvent.type) {
+            Constant.EVENT_UPDATE_CUSTOM -> {
+                updateInfo()
+            }
+
+            //TCP连接状态
+            Constant.EVENT_TCP_STATE -> {
+                updateTcpNetStatus()
+            }
+        }
+    }
 }

+ 0 - 228
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AnrFcExceptionUtil.java.bak

@@ -1,228 +0,0 @@
-package com.wdkl.app.ncs.callingdoor.helper;
-
-import android.app.AlarmManager;
-import android.app.Application;
-import android.app.PendingIntent;
-import android.content.Context;
-import android.content.Intent;
-import android.os.Build;
-import android.os.Environment;
-import android.util.Log;
-
-import com.github.anrwatchdog.ANRError;
-import com.github.anrwatchdog.ANRWatchDog;
-import com.wdkl.ncs.android.component.welcome.activity.WelcomeActivity;
-import com.wdkl.ncs.android.middleware.tcp.channel.DeviceChannel;
-import com.wdkl.skywebrtc.CallSession;
-import com.wdkl.skywebrtc.EnumType;
-import com.wdkl.skywebrtc.SkyEngineKit;
-
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.TimeZone;
-
-/**
- * Created by dengzhe on 2018/4/2.
- * //=========================FC&ANR异常处理类=========================//
- */
-
-public class AnrFcExceptionUtil implements Thread.UncaughtExceptionHandler {
-
-    private static ANRWatchDog mANRWatchDog;
-    private Thread.UncaughtExceptionHandler mDefaultHandler;
-    public static final String TAG = "MyApplication";
-    private static Application application;
-
-    private static AnrFcExceptionUtil mAnrFcExceptionUtil;
-
-    /**
-     * 存储异常和参数信息
-     */
-    private Map<String, String> paramsMap = new HashMap<>();
-    /**
-     * 格式化时间
-     */
-    private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HH-mm-ss");
-
-
-    public static AnrFcExceptionUtil getInstance(Application application) {
-        if (mAnrFcExceptionUtil == null) {
-            mAnrFcExceptionUtil = new AnrFcExceptionUtil(application);
-        }
-        return mAnrFcExceptionUtil;
-    }
-
-    private AnrFcExceptionUtil(Application application) {
-        //获取系统默认的UncaughtException处理器
-        mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();
-        this.application = application;
-    }
-
-    @Override
-    public void uncaughtException(Thread thread, Throwable ex) {
-        if (!handleException(ex) && mDefaultHandler != null) {
-            //如果用户没有处理则让系统默认的异常处理器来处理
-            mDefaultHandler.uncaughtException(thread, ex);
-        } else {
-            try {
-                Thread.sleep(2000);
-            } catch (InterruptedException e) {
-                Log.e(TAG, "error : ", e);
-            }
-
-            restartApp();
-            //android.os.Process.killProcess(android.os.Process.myPid());
-            //System.exit(0);
-        }
-    }
-
-    /**
-     * 自定义错误处理,收集错误信息 发送错误报告等操作均在此完成.
-     *
-     * @param ex
-     * @return true:如果处理了该异常信息;否则返回false.
-     */
-    private boolean handleException(Throwable ex) {
-        if (ex == null) {
-            return false;
-        }
-        //使用Toast来显示异常信息
-        /*new Thread() {
-            @Override
-            public void run() {
-                Looper.prepare();
-//                Toast.makeText(application.getApplicationContext(), "很抱歉,程序出现异常,即将重新启动.",
-//                        Toast.LENGTH_SHORT).show();
-                Looper.loop();
-            }
-        }.start();*/
-        saveCrashInfo2File(ex);
-        return true;
-    }
-
-    /**
-     * 保存错误信息到文件中
-     *
-     * @param ex
-     * @return 返回文件名称
-     */
-    private String saveCrashInfo2File(Throwable ex) {
-        StringBuffer sb = new StringBuffer();
-        for (Map.Entry<String, String> entry : paramsMap.entrySet()) {
-            String key = entry.getKey();
-            String value = entry.getValue();
-            sb.append(key + "=" + value + "\n");
-        }
-
-        Writer writer = new StringWriter();
-        PrintWriter printWriter = new PrintWriter(writer);
-        ex.printStackTrace(printWriter);
-        Throwable cause = ex.getCause();
-        while (cause != null) {
-            cause.printStackTrace(printWriter);
-            cause = cause.getCause();
-        }
-        printWriter.close();
-        String result = writer.toString();
-        sb.append(result);
-
-        try {
-            long timestamp = System.currentTimeMillis();
-            format.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
-            String time = format.format(new Date());
-            String fileName = "crash-" + time + "-" + timestamp + ".txt";
-            if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
-                String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/crash/";
-                File dir = new File(path);
-                if (!dir.exists()) {
-                    dir.mkdirs();
-                }
-                FileOutputStream fos = new FileOutputStream(path + fileName);
-                fos.write(sb.toString().getBytes());
-                Log.i(TAG, "saveCrashInfo2File: "+sb.toString());
-                fos.close();
-            }
-            return fileName;
-        } catch (Exception e) {
-            Log.e(TAG, "an error occured while writing file...", e);
-        }
-        return null;
-    }
-
-    private void restartApp() {
-        CallSession session= SkyEngineKit.Instance().getCurrentSession();
-        if(session!=null&&session.getState()!= EnumType.CallState.Idle){
-            SkyEngineKit.Instance().endCall();
-        }
-
-        //重新启动app
-        Intent mStartActivity = new Intent(application.getApplicationContext(), WelcomeActivity.class);
-        mStartActivity.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
-        int mPendingIntentId = 123456;
-        PendingIntent mPendingIntent = PendingIntent.getActivity(application.getApplicationContext(), mPendingIntentId, mStartActivity, PendingIntent.FLAG_CANCEL_CURRENT);
-        AlarmManager mgr = (AlarmManager) application.getApplicationContext().getSystemService(Context.ALARM_SERVICE);
-        mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 1500, mPendingIntent);
-
-        android.os.Process.killProcess(android.os.Process.myPid());
-        System.exit(0);
-    }
-
-    /**
-     * ===================================================崩溃异常处理===================================================
-     */
-    public void initFCException() {
-        //设置该CrashHandler为程序的默认处理器
-        AnrFcExceptionUtil catchExcep = AnrFcExceptionUtil.getInstance(application);
-        Thread.setDefaultUncaughtExceptionHandler(catchExcep);
-        mANRWatchDog = new ANRWatchDog(8000);
-        mANRWatchDog.setInterruptionListener(new ANRWatchDog.InterruptionListener() {
-            @Override
-            public void onInterrupted(InterruptedException exception) {
-            }
-        }).setIgnoreDebugger(true).setANRListener(new ANRWatchDog.ANRListener() {
-            @Override
-            public void onAppNotResponding(ANRError error) {
-                /*Intent mStartActivity = new Intent(application.getApplicationContext(), Constants.ANR_FC);
-                int mPendingIntentId = 123456;
-                PendingIntent mPendingIntent = PendingIntent.getActivity(application.getApplicationContext(), mPendingIntentId, mStartActivity, PendingIntent.FLAG_CANCEL_CURRENT);
-                AlarmManager mgr = (AlarmManager) application.getApplicationContext().getSystemService(Context.ALARM_SERVICE);
-                mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 1500, mPendingIntent);
-                android.os.Process.killProcess(android.os.Process.myPid());*/
-
-                //记录anr发生时间
-                /*try {
-                    long timestamp = System.currentTimeMillis();
-                    String time = format.format(new Date());
-                    format.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
-                    String fileName = "anr-" + time + "-" + timestamp + ".txt";
-                    if (Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) {
-                        String path = Environment.getExternalStorageDirectory() + "/anr/";
-                        File dir = new File(path);
-                        if (!dir.exists()) {
-                            dir.mkdirs();
-                        }
-                        FileOutputStream fos = new FileOutputStream(path + fileName);
-                        fos.write(fileName.getBytes());
-                        fos.close();
-                    }
-                } catch (Exception e) {
-                }*/
-
-                Log.d("anr", "Anr restart app...");
-                if ("rk3128".equals(Build.MODEL)) {
-                    AppUpdateHelper.reboot(application);
-                } else {
-                    restartApp();
-                }
-            }
-        }).start();
-
-    }
-}

+ 20 - 1
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AppUpdateHelper.java

@@ -2,6 +2,7 @@ package com.wdkl.app.ncs.callingdoor.helper;
 
 import android.app.AlarmManager;
 import android.app.PendingIntent;
+import android.app.zhyl.ZhylManager;
 import android.content.Context;
 import android.content.Intent;
 import android.content.pm.ApplicationInfo;
@@ -64,6 +65,22 @@ public class AppUpdateHelper {
         }
     }
 
+    public static void updateAppA133(Context context, UpdateCallBack callBack) {
+        if (checkApkExit(context)) {
+            Log.d(TAG, "文件存在");
+        } else {
+            Log.d(TAG, "文件不存在");
+            if (callBack != null) {
+                callBack.onFailed();
+            }
+            return;
+        }
+
+        String path = FILE_APK_PATH + "/" + FILE_APK_NAME;
+        ZhylManager zhylManager = ZhylManager.getInstance(context);
+        zhylManager.sys_doSilentInstallApp(path, context);
+    }
+
     public static void updateApp(Context context, UpdateCallBack callBack) {
         if (checkApkExit(context)) {
             Log.d(TAG, "文件存在");
@@ -215,9 +232,11 @@ public class AppUpdateHelper {
 
     public static void reboot(Context context) {
         Log.e("reboot","重启");
-        SerialPortHelper.resetDevice();
+
         if (Build.MODEL.equals("rk3128")) {
             try {
+                SerialPortHelper.resetDevice();
+
                 Intent intent = new Intent(Intent.ACTION_REBOOT);
                 intent.putExtra("nowait", 1);
                 intent.putExtra("interval", 1);

+ 1 - 1
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/NetHelper.java

@@ -215,7 +215,7 @@ public class NetHelper {
             if (!TextUtils.isEmpty(e) && e.length() >= 11 && e.length() <= 15) {
                 return e;
             } else {
-                return "192.168.101.1";
+                return "null";
             }
         } catch (Exception exception) {
             exception.printStackTrace();

+ 7 - 5
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/PasswordDialogHelper.java

@@ -24,14 +24,16 @@ public class PasswordDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity, final MyListener listener) {
+        if (dialog != null) {
+            dialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.password_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
 
         final String[] numbers = {"1","2","3","4","5","6","7","8","9"};
         final TextView password = contentView.findViewById(R.id.tv_psw_view);
-        final LinearLayout llPwd = contentView.findViewById(R.id.ll_password);
-        final LinearLayout llServer = contentView.findViewById(R.id.ll_server_config);
         GridView gridView = contentView.findViewById(R.id.grid_psw);
         NumAdapter adapter = new NumAdapter(numbers, activity);
         gridView.setAdapter(adapter);
@@ -97,8 +99,8 @@ public class PasswordDialogHelper {
             Window window = dialog.getWindow();
             window.setFlags(WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE, WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE);
             WindowManager.LayoutParams lp = window.getAttributes();
-            lp.width = 400;
-            lp.height = 480;
+            lp.width = WindowManager.LayoutParams.MATCH_PARENT;
+            lp.height = WindowManager.LayoutParams.WRAP_CONTENT;
             lp.gravity = Gravity.CENTER;
             window.setAttributes(lp);
 
@@ -116,7 +118,7 @@ public class PasswordDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (dialog != null && dialog.isShowing()) {
+        if (dialog != null) {
             dialog.dismiss();
         }
     }

+ 5 - 1
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/ServerConfigDialogHelper.java

@@ -29,6 +29,10 @@ public class ServerConfigDialogHelper {
     private static String pwd = "";
 
     public static void showPasswordDialog(final Activity activity) {
+        if (callDialog != null) {
+            callDialog.dismiss();
+        }
+
         View contentView = LayoutInflater.from(activity).inflate(R.layout.server_config_dialog_lay, null);
         AlertDialog.Builder builder = new AlertDialog.Builder(activity);
         builder.setView(contentView);
@@ -152,7 +156,7 @@ public class ServerConfigDialogHelper {
 
     public static void dismissCallDialog() {
         pwd = "";
-        if (callDialog != null && callDialog.isShowing()) {
+        if (callDialog != null) {
             callDialog.dismiss();
         }
     }

+ 7 - 8
callingdoor/src/main/res/layout-land/callingdoor_activation.xml

@@ -38,7 +38,7 @@
         <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="match_parent"
-            android:layout_marginLeft="@dimen/d600"
+            android:layout_marginLeft="@dimen/d580"
             android:layout_marginTop="@dimen/d41"
             android:layout_marginRight="@dimen/d24"
             android:layout_marginBottom="@dimen/d10"
@@ -136,7 +136,7 @@
                     android:layout_marginTop="@dimen/d15"
                     android:layout_toRightOf="@+id/activation_wg_title"
                     android:layout_below="@+id/activation_ip_title"
-                    android:text="192.168.0.0"
+                    android:text="0.0.0.0"
                     android:layout_marginLeft="@dimen/d10"
                     android:textSize="@dimen/font_size_12"
                     android:textColor="@color/txt_setting" />
@@ -160,7 +160,7 @@
                     android:layout_marginTop="@dimen/d15"
                     android:layout_below="@+id/activation_wg_title"
                     android:layout_toRightOf="@+id/activation_ym_title"
-                    android:text="192.168.0.0"
+                    android:text="0.0.0.0"
                     android:layout_marginLeft="@dimen/d10"
                     android:textSize="@dimen/font_size_12"
                     android:textColor="@color/txt_setting" />
@@ -217,9 +217,9 @@
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/d48"
-                android:layout_marginLeft="@dimen/d19"
+                android:layout_marginLeft="@dimen/d10"
                 android:layout_marginTop="@dimen/d20"
-                android:layout_marginRight="@dimen/d19"
+                android:layout_marginRight="@dimen/d10"
                 android:gravity="center_vertical"
                 android:orientation="horizontal">
                 <Button
@@ -230,7 +230,6 @@
                     android:gravity="center"
                     android:text="@string/str_network_config"
                     android:layout_weight="1"
-                    android:visibility="gone"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="16sp" />
 
@@ -239,7 +238,6 @@
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
                     android:layout_marginLeft="@dimen/d14"
-                    android:layout_marginRight="@dimen/d14"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
                     android:text="@string/str_restart"
@@ -251,7 +249,7 @@
                     android:id="@+id/activation_system_button"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
-                    android:layout_marginRight="@dimen/d14"
+                    android:layout_marginLeft="@dimen/d14"
                     android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
@@ -263,6 +261,7 @@
                     android:id="@+id/activation_services_button"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
+                    android:layout_marginLeft="@dimen/d14"
                     android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"

File diff suppressed because it is too large
+ 601 - 647
callingdoor/src/main/res/layout-land/callingdoor_setting_main.xml


+ 405 - 436
callingdoor/src/main/res/layout/calling_babymom_main.xml

@@ -1,523 +1,492 @@
 <?xml version="1.0" encoding="utf-8"?>
 <layout xmlns:android="http://schemas.android.com/apk/res/android">
-<LinearLayout
-    android:id="@+id/calling_door_babymom_mian"
-    android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:background="@color/baby_bg"
-    android:orientation="vertical"
-    >
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="42dp"
-
-        >
-        <!--设备号-->
-        <LinearLayout
-            android:id="@+id/mom_view_title_layout_return"
-            android:layout_width="@dimen/d105"
-            android:layout_height="@dimen/d30"
-            android:layout_marginLeft="20dp"
-            android:background="@drawable/shape_time_bu_bg"
-            android:clickable="true"
-            android:gravity="center"
-            android:layout_centerVertical="true"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:id="@+id/mom_view_title_layout_img"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:layout_marginRight="6dp"
-                android:visibility="gone"
-                android:background="@mipmap/return_b" />
-            <!--医院名称-->
-            <TextView
-                android:id="@+id/mom_view_title_layout_tv_hospital_name"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:text="科室名称"
-                android:textColor="@color/title_text"
-                android:textSize="@dimen/font_size_14" />
-        </LinearLayout>
-        <TextView
-            android:id="@+id/mom_view_title_layout_tv_no"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_centerVertical="true"
-            android:layout_centerHorizontal="true"
-            android:layout_marginRight="10dp"
-            android:text="ID:"
-            android:visibility="gone"
-            android:textColor="@color/black"
-            android:textSize="@dimen/font_size_18" />
-        <!--状态图标-->
-        <LinearLayout
-            android:id="@+id/mom_view_title_layout_ll_right"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:layout_alignParentRight="true"
-            android:layout_centerVertical="true"
-            android:layout_marginRight="10dp"
-            android:orientation="horizontal">
-
-            <ImageView
-                android:layout_width="@dimen/d22"
-                android:layout_height="@dimen/d22"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:background="@mipmap/riqi_b" />
-            <!--日期-->
-            <TextClock
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:format12Hour="yyyy-MM-dd EEEE"
-                android:format24Hour="yyyy-MM-dd EEEE"
-                android:textColor="@color/white"
-                android:textSize="@dimen/font_size_14"
-                android:layout_marginLeft="@dimen/d5"
-                android:text="16:08"/>
-
-            <ImageView
-                android:layout_width="@dimen/d22"
-                android:layout_height="@dimen/d22"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="@dimen/d23"
-                android:layout_marginRight="4dp"
-                android:background="@mipmap/shijian_b" />
-            <!--时间-->
-            <TextClock
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:format12Hour="HH:mm"
-                android:format24Hour="HH:mm"
-                android:textColor="@color/white"
-                android:textSize="@dimen/font_size_14"
-                android:layout_marginLeft="@dimen/d5"
-                android:layout_marginRight="@dimen/d15"
-                android:text="16:08"/>
-
-            <!--SIP状态图标-->
-            <TextView
-                android:id="@+id/mom_view_title_layout_tv_point"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_centerVertical="true"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:visibility="gone"
-                android:background="@mipmap/sip_b"/>
-
-            <ImageView
-                android:id="@+id/mom_view_title_layout_iv_bt"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:visibility="gone"/>
-            <ImageView
-                android:id="@+id/mom_view_title_layout_iv_wifi"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:visibility="gone"/>
-            <ImageView
-                android:id="@+id/mom_view_title_layout_iv_tcp"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:src="@mipmap/ic_tcp_fail"/>
-
-            <ImageView
-                android:id="@+id/mom_view_title_layout_iv_ethernet"
-                android:layout_width="20dp"
-                android:layout_height="20dp"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:src="@mipmap/ic_ethernet_success_w"
-                />
-
-            <ImageView
-                android:id="@+id/mom_view_title_layout_iv_day_night"
-                android:layout_width="20dp"
-                android:layout_height="wrap_content"
-                android:layout_gravity="center_vertical"
-                android:layout_marginLeft="4dp"
-                android:layout_marginRight="4dp"
-                android:src="@mipmap/ic_daylight_w" />
-
-        </LinearLayout>
-
-    </RelativeLayout>
 
     <LinearLayout
-        android:id="@+id/babymom_mian_top"
+        android:id="@+id/calling_door_babymom_mian"
         android:layout_width="match_parent"
-        android:layout_height="@dimen/d100"
-        android:background="@drawable/shape_baby_top_bg2"
-        android:gravity="center"
-        android:layout_marginTop="@dimen/d20"
-        android:layout_marginLeft="@dimen/d30"
-        android:layout_marginRight="@dimen/d30"
-        >
-        <TextView
-            android:id="@+id/babymom_mian_top_txt"
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:text="0025房"
-            android:textStyle="bold"
-            android:textColor="@color/baby_top_txt"
-            android:textSize="@dimen/font_size_60"
-            />
-    </LinearLayout>
+        android:layout_height="match_parent"
+        android:background="@color/baby_bg"
+        android:orientation="vertical">
 
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginTop="@dimen/d10"
-        android:layout_marginLeft="@dimen/d30"
-        android:layout_marginRight="@dimen/d30"
-        >
-        <LinearLayout
-            android:layout_width="wrap_content"
-            android:layout_height="wrap_content"
-            android:orientation="horizontal"
-
-            >
-            <ImageView
-                android:id="@+id/baby_mom_img"
-                android:layout_width="180dp"
-                android:layout_height="165dp"
-                android:src="@mipmap/mom"
-                />
-            <TextView
-                android:id="@+id/babymom_mian_bg_txt"
-                android:layout_width="wrap_content"
-                android:layout_height="wrap_content"
-                android:layout_marginTop="@dimen/d40"
-                android:text="@string/baby_bg_txt"
-                android:textStyle="bold"
-                android:textColor="@color/white"
-                android:textSize="32sp"
-                android:layout_toRightOf="@+id/baby_mom_img"
-                />
-        </LinearLayout>
-
-        <LinearLayout
+        <RelativeLayout
             android:layout_width="match_parent"
-            android:layout_height="@dimen/d300"
-            android:background="@mipmap/baby_bg"
-            android:layout_marginTop="155dp"
-            >
-
+            android:layout_height="42dp">
+            <!--设备号-->
             <LinearLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:gravity="right"
-                android:orientation="vertical"
-                >
-
-                <TextView
-                    android:id="@+id/babymom_mian_title_tx1"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/d43"
-                    android:layout_marginRight="@dimen/d30"
-                    android:paddingLeft="@dimen/d18"
-                    android:paddingRight="@dimen/d18"
-                    android:paddingTop="@dimen/d5"
-                    android:paddingBottom="@dimen/d5"
-                    android:text="@string/door_mom_title_2"
-                    android:textStyle="bold"
-                    android:textColor="@color/white"
-                    android:textSize="32sp"
-                    android:gravity="center"
-                    android:background="@drawable/shape_baby_bg_title2"
-                    />
+                android:id="@+id/mom_view_title_layout_return"
+                android:layout_width="@dimen/d120"
+                android:layout_height="@dimen/d30"
+                android:layout_centerVertical="true"
+                android:layout_marginLeft="20dp"
+                android:background="@drawable/shape_time_bu_bg"
+                android:gravity="center"
+                android:orientation="horizontal">
 
-                <TextView
-                    android:id="@+id/babymom_mian_name"
+                <ImageView
+                    android:id="@+id/mom_view_title_layout_img"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/d22"
-                    android:layout_marginRight="@dimen/d22"
-                    android:text="张翠华"
-                    android:textStyle="bold"
-                    android:textColor="@color/black"
-                    android:textSize="60sp"
-                    android:gravity="center"
-                    />
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginRight="6dp"
+                    android:background="@mipmap/return_b"
+                    android:visibility="gone" />
+                <!--医院名称-->
                 <TextView
-                    android:id="@+id/babymom_mian_time_out"
+                    android:id="@+id/mom_view_title_layout_tv_hospital_name"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/d25"
-                    android:layout_marginRight="@dimen/d5"
-                    android:paddingBottom="@dimen/d15"
-                    android:paddingTop="@dimen/d15"
-                    android:paddingRight="@dimen/d20"
-                    android:paddingLeft="@dimen/d20"
-                    android:text="入住日期:2023年7月17日"
-                    android:textStyle="bold"
-                    android:textColor="#F8757E"
-                    android:textSize="16sp"
-                    android:gravity="center"
-                    android:background="@drawable/shape_baby_time_out_bg"
-                    />
-
-
+                    android:paddingLeft="6dp"
+                    android:paddingRight="6dp"
+                    android:singleLine="true"
+                    android:ellipsize="end"
+                    android:text="----"
+                    android:textColor="@color/title_text"
+                    android:textSize="@dimen/font_size_14" />
             </LinearLayout>
 
+            <TextView
+                android:id="@+id/mom_view_title_layout_tv_no"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_centerHorizontal="true"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="10dp"
+                android:text="ID:"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_18"
+                android:visibility="gone" />
+            <!--状态图标-->
             <LinearLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                android:orientation="vertical"
-                >
-
+                android:id="@+id/mom_view_title_layout_ll_right"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentRight="true"
+                android:layout_centerVertical="true"
+                android:layout_marginRight="10dp"
+                android:orientation="horizontal">
 
-                <TextView
-                    android:id="@+id/babymom_mian_title_tx2"
+                <ImageView
+                    android:layout_width="@dimen/d22"
+                    android:layout_height="@dimen/d22"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:background="@mipmap/riqi_b" />
+                <!--日期-->
+                <TextClock
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/d43"
-                    android:layout_marginLeft="@dimen/d30"
-                    android:paddingLeft="@dimen/d18"
-                    android:paddingRight="@dimen/d18"
-                    android:paddingTop="@dimen/d5"
-                    android:paddingBottom="@dimen/d5"
-                    android:text="@string/door_mom_title_3"
-                    android:textStyle="bold"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="@dimen/d5"
+                    android:format12Hour="yyyy-MM-dd EEEE"
+                    android:format24Hour="yyyy-MM-dd EEEE"
+                    android:text="----"
                     android:textColor="@color/white"
-                    android:textSize="32sp"
-                    android:gravity="center"
-                    android:background="@drawable/shape_baby_bg_title2"
-                    android:layout_centerHorizontal="true"
-                    />
-                <TextView
-                    android:id="@+id/babymom_mian_age"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/d22"
-                    android:layout_marginLeft="@dimen/d50"
-                    android:text="38岁"
-                    android:textStyle="bold"
-                    android:textColor="@color/black"
-                    android:textSize="60sp"
-                    android:gravity="center"
-                    />
+                    android:textSize="@dimen/font_size_14" />
 
-                <TextView
-                    android:id="@+id/babymom_mian_time_end"
+                <ImageView
+                    android:layout_width="@dimen/d22"
+                    android:layout_height="@dimen/d22"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="@dimen/d23"
+                    android:layout_marginRight="4dp"
+                    android:background="@mipmap/shijian_b" />
+                <!--时间-->
+                <TextClock
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:layout_marginTop="@dimen/d25"
-                    android:layout_marginRight="@dimen/d5"
-                    android:paddingBottom="@dimen/d15"
-                    android:paddingTop="@dimen/d15"
-                    android:paddingRight="@dimen/d20"
-                    android:paddingLeft="@dimen/d20"
-                    android:text="离宫日期:2023年7月17日"
-                    android:textStyle="bold"
-                    android:textColor="#FF9B6E"
-                    android:textSize="16sp"
-                    android:gravity="center"
-                    android:background="@drawable/shape_baby_time_end_bg"
-                    />
-            </LinearLayout>
-
-
-
-
-        </LinearLayout>
-
-        <TextView
-            android:id="@+id/babymom_mian_title_tx"
-            android:layout_width="@dimen/d230"
-            android:layout_height="@dimen/d60"
-            android:text="@string/door_mom_title_1"
-            android:textStyle="bold"
-            android:textColor="@color/white"
-            android:textSize="32sp"
-            android:gravity="center"
-            android:background="@drawable/shape_baby_bg_title"
-            android:layout_centerHorizontal="true"
-            android:layout_marginTop="@dimen/d105"
-            />
-
-
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="@dimen/d5"
+                    android:layout_marginRight="@dimen/d15"
+                    android:format12Hour="HH:mm"
+                    android:format24Hour="HH:mm"
+                    android:text="--:--"
+                    android:textColor="@color/white"
+                    android:textSize="@dimen/font_size_14" />
 
+                <!--SIP状态图标-->
+                <TextView
+                    android:id="@+id/mom_view_title_layout_tv_point"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:background="@mipmap/sip_b"
+                    android:visibility="gone" />
 
+                <ImageView
+                    android:id="@+id/mom_view_title_layout_iv_bt"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:visibility="gone" />
 
+                <ImageView
+                    android:id="@+id/mom_view_title_layout_iv_wifi"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:visibility="gone" />
 
+                <ImageView
+                    android:id="@+id/mom_view_title_layout_iv_tcp"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:src="@mipmap/ic_tcp_fail" />
 
+                <ImageView
+                    android:id="@+id/mom_view_title_layout_iv_ethernet"
+                    android:layout_width="20dp"
+                    android:layout_height="20dp"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:src="@mipmap/ic_ethernet_success_w" />
 
-    </RelativeLayout>
+                <ImageView
+                    android:id="@+id/mom_view_title_layout_iv_day_night"
+                    android:layout_width="20dp"
+                    android:layout_height="wrap_content"
+                    android:layout_gravity="center_vertical"
+                    android:layout_marginLeft="4dp"
+                    android:layout_marginRight="4dp"
+                    android:src="@mipmap/ic_daylight_w" />
 
-    <RelativeLayout
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/d30"
-        android:layout_marginRight="@dimen/d30"
-        >
+            </LinearLayout>
 
+        </RelativeLayout>
 
         <LinearLayout
+            android:id="@+id/babymom_mian_top"
             android:layout_width="match_parent"
-            android:layout_height="266dp"
-            android:background="@mipmap/baby_bg"
-            android:layout_marginTop="90dp"
-            >
+            android:layout_height="@dimen/d120"
+            android:layout_marginLeft="@dimen/d30"
+            android:layout_marginTop="@dimen/d20"
+            android:layout_marginRight="@dimen/d30"
+            android:background="@drawable/shape_baby_top_bg2"
+            android:gravity="center">
+
+            <com.wdkl.ncs.android.lib.widget.MarqueeTextView
+                android:id="@+id/babymom_mian_top_txt"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:ellipsize="marquee"
+                android:focusable="true"
+                android:focusableInTouchMode="true"
+                android:marqueeRepeatLimit="-1"
+                android:singleLine="true"
+                android:text="--"
+                android:textColor="@color/baby_top_txt"
+                android:textSize="88sp"
+                android:textStyle="bold" />
+        </LinearLayout>
 
-            <RelativeLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-               >
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/d30"
+            android:layout_marginTop="@dimen/d10"
+            android:layout_marginRight="@dimen/d30">
+
+            <LinearLayout
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:orientation="horizontal">
 
                 <ImageView
-                    android:id="@+id/baby_img"
-                    android:layout_width="@dimen/d100"
-                    android:layout_height="@dimen/d100"
-                    android:layout_marginLeft="@dimen/d10"
-                    android:layout_marginBottom="@dimen/d10"
-                    android:layout_alignParentBottom="true"
-                    />
+                    android:id="@+id/baby_mom_img"
+                    android:layout_width="180dp"
+                    android:layout_height="165dp"
+                    android:src="@mipmap/mom" />
 
-                <RelativeLayout
-                    android:layout_width="match_parent"
+                <TextView
+                    android:id="@+id/babymom_mian_bg_txt"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_marginTop="@dimen/d40"
+                    android:layout_toRightOf="@+id/baby_mom_img"
+                    android:text="@string/baby_bg_txt"
+                    android:textColor="@color/white"
+                    android:textSize="32sp"
+                    android:textStyle="bold" />
+            </LinearLayout>
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/d300"
+                android:layout_marginTop="155dp"
+                android:background="@mipmap/baby_bg">
+
+                <LinearLayout
+                    android:layout_width="0dp"
                     android:layout_height="match_parent"
-                    android:layout_toRightOf="@+id/baby_img"
-                    >
+                    android:layout_weight="1"
+                    android:gravity="right"
+                    android:orientation="vertical">
+
                     <TextView
-                        android:id="@+id/babymom_mian_title_tx4"
+                        android:id="@+id/babymom_mian_title_tx1"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_marginTop="@dimen/d43"
+                        android:layout_marginRight="@dimen/d30"
+                        android:background="@drawable/shape_baby_bg_title2"
+                        android:gravity="center"
                         android:paddingLeft="@dimen/d18"
-                        android:paddingRight="@dimen/d18"
                         android:paddingTop="@dimen/d5"
+                        android:paddingRight="@dimen/d18"
                         android:paddingBottom="@dimen/d5"
-                        android:text="@string/door_mom_title_5"
-                        android:textStyle="bold"
+                        android:text="@string/door_mom_title_2"
                         android:textColor="@color/white"
-                        android:textSize="28sp"
-                        android:layout_centerHorizontal="true"
-                        android:background="@drawable/shape_baby_bg_title2"
-                        />
+                        android:textSize="32sp"
+                        android:textStyle="bold" />
 
                     <TextView
-                        android:id="@+id/babymom_mian_baby_name"
+                        android:id="@+id/babymom_mian_name"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/babymom_mian_title_tx4"
-                        android:layout_gravity="right"
                         android:layout_marginTop="@dimen/d22"
-                        android:layout_centerHorizontal="true"
-                        android:text="刘一帆"
+                        android:layout_marginRight="@dimen/d22"
+                        android:gravity="center"
                         android:textColor="@color/black"
-                        android:layout_centerVertical="true"
-                        android:textSize="50sp"
+                        android:textSize="60sp"
                         android:textStyle="bold" />
-                </RelativeLayout>
-
-            </RelativeLayout>
 
-            <RelativeLayout
-                android:layout_width="0dp"
-                android:layout_height="match_parent"
-                android:layout_weight="1"
-                >
+                    <TextView
+                        android:id="@+id/babymom_mian_time_out"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d25"
+                        android:layout_marginRight="@dimen/d5"
+                        android:background="@drawable/shape_baby_time_out_bg"
+                        android:gravity="center"
+                        android:paddingLeft="@dimen/d20"
+                        android:paddingTop="@dimen/d15"
+                        android:paddingRight="@dimen/d20"
+                        android:paddingBottom="@dimen/d15"
+                        android:text="@string/door_mom_main_1"
+                        android:textColor="#F8757E"
+                        android:textSize="16sp"
+                        android:textStyle="bold" />
 
+                </LinearLayout>
 
-                <RelativeLayout
-                    android:layout_width="wrap_content"
+                <LinearLayout
+                    android:layout_width="0dp"
                     android:layout_height="match_parent"
-                    android:layout_toLeftOf="@+id/baby_img2"
-                    >
+                    android:layout_weight="1"
+                    android:orientation="vertical">
+
                     <TextView
-                        android:id="@+id/babymom_mian_title_tx5"
+                        android:id="@+id/babymom_mian_title_tx2"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
+                        android:layout_marginLeft="@dimen/d30"
                         android:layout_marginTop="@dimen/d43"
+                        android:background="@drawable/shape_baby_bg_title2"
+                        android:gravity="center"
                         android:paddingLeft="@dimen/d18"
-                        android:paddingRight="@dimen/d18"
                         android:paddingTop="@dimen/d5"
+                        android:paddingRight="@dimen/d18"
                         android:paddingBottom="@dimen/d5"
-                        android:text="@string/door_mom_title_6"
-                        android:textStyle="bold"
+                        android:text="@string/door_mom_title_3"
                         android:textColor="@color/white"
-                        android:textSize="28sp"
-                        android:gravity="center"
-                        android:background="@drawable/shape_baby_bg_title2"
-                        android:layout_centerHorizontal="true"
-                        />
+                        android:textSize="32sp"
+                        android:textStyle="bold" />
+
                     <TextView
-                        android:id="@+id/babymom_mian_baby_sex"
+                        android:id="@+id/babymom_mian_age"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_below="@+id/babymom_mian_title_tx5"
+                        android:layout_marginLeft="@dimen/d50"
                         android:layout_marginTop="@dimen/d22"
-                        android:layout_centerHorizontal="true"
-                        android:text="女宝"
-                        android:textStyle="bold"
-                        android:textColor="@color/black"
-                        android:textSize="50sp"
                         android:gravity="center"
-                        />
-
-
-                </RelativeLayout>
-                <ImageView
-                    android:id="@+id/baby_img2"
-                    android:layout_width="@dimen/d100"
-                    android:layout_height="@dimen/d100"
-                    android:layout_marginRight="@dimen/d10"
-                    android:layout_marginBottom="@dimen/d10"
-                    android:layout_alignParentBottom="true"
-                    android:layout_alignParentRight="true"
-                   />
-            </RelativeLayout>
-
+                        android:textColor="@color/black"
+                        android:textSize="60sp"
+                        android:textStyle="bold" />
 
+                    <TextView
+                        android:id="@+id/babymom_mian_time_end"
+                        android:layout_width="wrap_content"
+                        android:layout_height="wrap_content"
+                        android:layout_marginTop="@dimen/d25"
+                        android:layout_marginRight="@dimen/d5"
+                        android:background="@drawable/shape_baby_time_end_bg"
+                        android:gravity="center"
+                        android:paddingLeft="@dimen/d20"
+                        android:paddingTop="@dimen/d15"
+                        android:paddingRight="@dimen/d20"
+                        android:paddingBottom="@dimen/d15"
+                        android:text="@string/door_mom_main_2"
+                        android:textColor="#FF9B6E"
+                        android:textSize="16sp"
+                        android:textStyle="bold" />
+                </LinearLayout>
 
+            </LinearLayout>
 
+            <TextView
+                android:id="@+id/babymom_mian_title_tx"
+                android:layout_width="@dimen/d230"
+                android:layout_height="@dimen/d60"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="@dimen/d105"
+                android:background="@drawable/shape_baby_bg_title"
+                android:gravity="center"
+                android:text="@string/door_mom_title_1"
+                android:textColor="@color/white"
+                android:textSize="32sp"
+                android:textStyle="bold" />
 
+        </RelativeLayout>
 
+        <RelativeLayout
+            android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/d30"
+            android:layout_marginRight="@dimen/d30">
 
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="266dp"
+                android:layout_marginTop="90dp"
+                android:background="@mipmap/baby_bg">
 
-        </LinearLayout>
+                <RelativeLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1">
+
+                    <ImageView
+                        android:id="@+id/baby_img"
+                        android:layout_width="@dimen/d100"
+                        android:layout_height="@dimen/d100"
+                        android:layout_alignParentBottom="true"
+                        android:layout_marginLeft="@dimen/d10"
+                        android:layout_marginBottom="@dimen/d10" />
+
+                    <RelativeLayout
+                        android:layout_width="match_parent"
+                        android:layout_height="match_parent"
+                        android:layout_toRightOf="@+id/baby_img">
+
+                        <TextView
+                            android:id="@+id/babymom_mian_title_tx4"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginTop="@dimen/d43"
+                            android:background="@drawable/shape_baby_bg_title2"
+                            android:paddingLeft="@dimen/d18"
+                            android:paddingTop="@dimen/d5"
+                            android:paddingRight="@dimen/d18"
+                            android:paddingBottom="@dimen/d5"
+                            android:text="@string/door_mom_title_5"
+                            android:textColor="@color/white"
+                            android:textSize="28sp"
+                            android:textStyle="bold" />
+
+                        <TextView
+                            android:id="@+id/babymom_mian_baby_name"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@+id/babymom_mian_title_tx4"
+                            android:layout_centerHorizontal="true"
+                            android:layout_centerVertical="true"
+                            android:layout_gravity="right"
+                            android:layout_marginTop="@dimen/d22"
+                            android:text="--"
+                            android:textColor="@color/black"
+                            android:textSize="50sp"
+                            android:textStyle="bold" />
+                    </RelativeLayout>
 
-        <TextView
-            android:id="@+id/babymom_mian_title_tx3"
-            android:layout_width="@dimen/d230"
-            android:layout_height="@dimen/d60"
-            android:text="@string/door_mom_title_4"
-            android:textStyle="bold"
-            android:textColor="@color/white"
-            android:textSize="32sp"
-            android:gravity="center"
-            android:background="@drawable/shape_baby_bg_title"
-            android:layout_centerHorizontal="true"
-            android:layout_marginTop="@dimen/d30"
-            />
-    </RelativeLayout>
+                </RelativeLayout>
 
+                <RelativeLayout
+                    android:layout_width="0dp"
+                    android:layout_height="match_parent"
+                    android:layout_weight="1">
 
+                    <RelativeLayout
+                        android:layout_width="wrap_content"
+                        android:layout_height="match_parent"
+                        android:layout_toLeftOf="@+id/baby_img2">
+
+                        <TextView
+                            android:id="@+id/babymom_mian_title_tx5"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginTop="@dimen/d43"
+                            android:background="@drawable/shape_baby_bg_title2"
+                            android:gravity="center"
+                            android:paddingLeft="@dimen/d18"
+                            android:paddingTop="@dimen/d5"
+                            android:paddingRight="@dimen/d18"
+                            android:paddingBottom="@dimen/d5"
+                            android:text="@string/door_mom_title_6"
+                            android:textColor="@color/white"
+                            android:textSize="28sp"
+                            android:textStyle="bold" />
+
+                        <TextView
+                            android:id="@+id/babymom_mian_baby_sex"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_below="@+id/babymom_mian_title_tx5"
+                            android:layout_centerHorizontal="true"
+                            android:layout_marginTop="@dimen/d22"
+                            android:gravity="center"
+                            android:text="--"
+                            android:textColor="@color/black"
+                            android:textSize="50sp"
+                            android:textStyle="bold" />
+
+                    </RelativeLayout>
+
+                    <ImageView
+                        android:id="@+id/baby_img2"
+                        android:layout_width="@dimen/d100"
+                        android:layout_height="@dimen/d100"
+                        android:layout_alignParentRight="true"
+                        android:layout_alignParentBottom="true"
+                        android:layout_marginRight="@dimen/d10"
+                        android:layout_marginBottom="@dimen/d10" />
+                </RelativeLayout>
 
+            </LinearLayout>
 
+            <TextView
+                android:id="@+id/babymom_mian_title_tx3"
+                android:layout_width="@dimen/d230"
+                android:layout_height="@dimen/d60"
+                android:layout_centerHorizontal="true"
+                android:layout_marginTop="@dimen/d30"
+                android:background="@drawable/shape_baby_bg_title"
+                android:gravity="center"
+                android:text="@string/door_mom_title_4"
+                android:textColor="@color/white"
+                android:textSize="32sp"
+                android:textStyle="bold" />
 
+            <TextView
+                android:id="@+id/babymom_main_version"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_alignParentBottom="true"
+                android:layout_alignParentRight="true"
+                android:text="V--"
+                android:textColor="@color/white"
+                android:textSize="16sp" />
+        </RelativeLayout>
 
-</LinearLayout>
+    </LinearLayout>
 </layout>

+ 161 - 162
callingdoor/src/main/res/layout/callingdoor_activation.xml

@@ -39,205 +39,204 @@
             />
 
         <LinearLayout
-            android:layout_width="@dimen/d370"
+            android:layout_width="@dimen/d400"
             android:layout_height="@dimen/d520"
-            android:orientation="vertical"
-            android:gravity="center"
-            android:background="@drawable/shape_bed_bg"
             android:layout_below="@+id/activation_title_msg"
+            android:layout_centerHorizontal="true"
             android:layout_marginTop="@dimen/d20"
             android:layout_marginRight="@dimen/d24"
-            android:layout_centerHorizontal="true"
-            android:layout_marginBottom="@dimen/d10">
+            android:layout_marginBottom="@dimen/d10"
+            android:background="@drawable/shape_bed_bg"
+            android:gravity="center"
+            android:orientation="vertical">
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d35"
+                android:text="@string/str_data_care"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_18" />
+
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d10"
+                android:text="@string/str_scan_qr_code"
+                android:textColor="@color/black"
+                android:textSize="@dimen/font_size_10" />
+
+            <ImageView
+                android:id="@+id/activation_qr_code"
+                android:layout_width="@dimen/d112"
+                android:layout_height="@dimen/d112"
+                android:layout_marginTop="@dimen/d10" />
+
+            <RelativeLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_marginTop="@dimen/d15">
 
                 <TextView
+                    android:id="@+id/activation_v_title"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/str_data_care"
-                    android:textSize="@dimen/font_size_18"
+                    android:layout_marginLeft="@dimen/d118"
+                    android:text="@string/str_version"
                     android:textColor="@color/black"
-                    android:layout_marginTop="@dimen/d35" />
+                    android:textSize="@dimen/font_size_13"
+                    android:textStyle="bold" />
 
                 <TextView
+                    android:id="@+id/activation_v"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
-                    android:text="@string/str_scan_qr_code"
-                    android:textSize="@dimen/font_size_10"
-                    android:textColor="@color/black"
-                    android:layout_marginTop="@dimen/d10" />
-
-                <ImageView
-                    android:id="@+id/activation_qr_code"
-                    android:layout_width="@dimen/d112"
-                    android:layout_height="@dimen/d112"
-                    android:layout_marginTop="@dimen/d10" />
+                    android:layout_marginLeft="@dimen/d10"
+                    android:layout_toRightOf="@+id/activation_v_title"
+                    android:text="V1.1.1"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_12" />
 
-                <RelativeLayout
-                    android:layout_width="match_parent"
+                <TextView
+                    android:id="@+id/activation_ip_title"
+                    android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_v_title"
+                    android:layout_alignRight="@+id/activation_v_title"
                     android:layout_marginTop="@dimen/d15"
-                    >
-
-                    <TextView
-                        android:id="@+id/activation_v_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="@string/str_version"
-                        android:layout_marginLeft="@dimen/d118"
-                        android:textSize="@dimen/font_size_13"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
-
-                    <TextView
-                        android:id="@+id/activation_v"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:text="V1.1.1"
-                        android:layout_toRightOf="@+id/activation_v_title"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_12"
-                        android:textColor="@color/txt_setting" />
-
-                    <TextView
-                        android:id="@+id/activation_ip_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="@string/str_ip"
-                        android:layout_below="@+id/activation_v_title"
-                        android:layout_alignRight="@+id/activation_v_title"
-                        android:textSize="@dimen/font_size_13"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
+                    android:text="@string/str_ip"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_13"
+                    android:textStyle="bold" />
 
-                    <TextView
-                        android:id="@+id/activation_ip"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="192.168.0.0"
-                        android:layout_below="@+id/activation_v_title"
-                        android:layout_toRightOf="@+id/activation_ip_title"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_12"
-                        android:textColor="@color/txt_setting" />
+                <TextView
+                    android:id="@+id/activation_ip"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_v_title"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:layout_marginTop="@dimen/d15"
+                    android:layout_toRightOf="@+id/activation_ip_title"
+                    android:text="192.168.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_12" />
 
-                    <TextView
-                        android:id="@+id/activation_wg_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/d15"
-                        android:layout_below="@+id/activation_ip_title"
-                        android:layout_alignRight="@+id/activation_ip_title"
-                        android:text="@string/str_gateway"
-                        android:textSize="@dimen/font_size_13"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
+                <TextView
+                    android:id="@+id/activation_wg_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_ip_title"
+                    android:layout_alignRight="@+id/activation_ip_title"
+                    android:layout_marginTop="@dimen/d15"
+                    android:text="@string/str_gateway"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_13"
+                    android:textStyle="bold" />
 
-                    <TextView
-                        android:id="@+id/activation_wg"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/d15"
-                        android:layout_toRightOf="@+id/activation_wg_title"
-                        android:layout_below="@+id/activation_ip_title"
-                        android:text="192.168.0.0"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_12"
-                        android:textColor="@color/txt_setting" />
+                <TextView
+                    android:id="@+id/activation_wg"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_ip_title"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:layout_marginTop="@dimen/d15"
+                    android:layout_toRightOf="@+id/activation_wg_title"
+                    android:text="0.0.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_12" />
 
-                    <TextView
-                        android:id="@+id/activation_ym_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_below="@+id/activation_wg_title"
-                        android:layout_alignRight="@+id/activation_wg_title"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="@string/str_netmask"
-                        android:textSize="@dimen/font_size_13"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
+                <TextView
+                    android:id="@+id/activation_ym_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_wg_title"
+                    android:layout_alignRight="@+id/activation_wg_title"
+                    android:layout_marginTop="@dimen/d15"
+                    android:text="@string/str_netmask"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_13"
+                    android:textStyle="bold" />
 
-                    <TextView
-                        android:id="@+id/activation_ym"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_marginTop="@dimen/d15"
-                        android:layout_below="@+id/activation_wg_title"
-                        android:layout_toRightOf="@+id/activation_ym_title"
-                        android:text="192.168.0.0"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_12"
-                        android:textColor="@color/txt_setting" />
+                <TextView
+                    android:id="@+id/activation_ym"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_wg_title"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:layout_marginTop="@dimen/d15"
+                    android:layout_toRightOf="@+id/activation_ym_title"
+                    android:text="0.0.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_12" />
 
-                    <TextView
-                        android:id="@+id/activation_zcm_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_below="@+id/activation_ym_title"
-                        android:layout_alignRight="@+id/activation_ym_title"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="@string/str_register_id"
-                        android:textSize="@dimen/font_size_13"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
+                <TextView
+                    android:id="@+id/activation_zcm_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_ym_title"
+                    android:layout_alignRight="@+id/activation_ym_title"
+                    android:layout_marginTop="@dimen/d15"
+                    android:text="@string/str_register_id"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_13"
+                    android:textStyle="bold" />
 
-                    <TextView
-                        android:id="@+id/activation_zcm"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_below="@+id/activation_ym_title"
-                        android:layout_toRightOf="@+id/activation_zcm_title"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="192.168.0.0"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_10"
-                        android:textColor="@color/txt_setting" />
+                <TextView
+                    android:id="@+id/activation_zcm"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_ym_title"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:layout_marginTop="@dimen/d15"
+                    android:layout_toRightOf="@+id/activation_zcm_title"
+                    android:text="192.168.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_10" />
 
-                    <TextView
-                        android:id="@+id/activation_fuq_title"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_alignRight="@+id/activation_zcm_title"
-                        android:layout_below="@+id/activation_zcm_title"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="@string/str_server_ip"
-                        android:textSize="@dimen/font_size_13"
-                        android:textColor="@color/black"
-                        android:textStyle="bold" />
+                <TextView
+                    android:id="@+id/activation_fuq_title"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_zcm_title"
+                    android:layout_alignRight="@+id/activation_zcm_title"
+                    android:layout_marginTop="@dimen/d15"
+                    android:text="@string/str_server_ip"
+                    android:textColor="@color/black"
+                    android:textSize="@dimen/font_size_13"
+                    android:textStyle="bold" />
 
-                    <TextView
-                        android:id="@+id/activation_fuq"
-                        android:layout_width="wrap_content"
-                        android:layout_height="wrap_content"
-                        android:layout_below="@+id/activation_zcm_title"
-                        android:layout_toRightOf="@+id/activation_fuq_title"
-                        android:layout_marginTop="@dimen/d15"
-                        android:text="192.168.0.0"
-                        android:layout_marginLeft="@dimen/d10"
-                        android:textSize="@dimen/font_size_10"
-                        android:textColor="@color/txt_setting" />
-                </RelativeLayout>
+                <TextView
+                    android:id="@+id/activation_fuq"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:layout_below="@+id/activation_zcm_title"
+                    android:layout_marginLeft="@dimen/d10"
+                    android:layout_marginTop="@dimen/d15"
+                    android:layout_toRightOf="@+id/activation_fuq_title"
+                    android:text="192.168.0.0"
+                    android:textColor="@color/txt_setting"
+                    android:textSize="@dimen/font_size_10" />
+            </RelativeLayout>
 
 
             <LinearLayout
                 android:layout_width="match_parent"
                 android:layout_height="@dimen/d48"
-                android:layout_marginLeft="@dimen/d19"
-                android:layout_marginRight="@dimen/d19"
+                android:layout_marginLeft="@dimen/d14"
                 android:layout_marginTop="@dimen/d20"
+                android:layout_marginRight="@dimen/d14"
                 android:layout_marginBottom="@dimen/d50"
                 android:gravity="center_vertical"
                 android:orientation="horizontal">
+
                 <Button
                     android:id="@+id/activation_language_button"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
+                    android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
                     android:text="@string/str_network_config"
-                    android:layout_weight="1"
-                    android:visibility="gone"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="16sp" />
 
@@ -246,11 +245,10 @@
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
                     android:layout_marginLeft="@dimen/d14"
-                    android:layout_marginRight="@dimen/d14"
+                    android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
                     android:text="@string/str_restart"
-                    android:layout_weight="1"
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="16sp" />
 
@@ -258,7 +256,7 @@
                     android:id="@+id/activation_system_button"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
-                    android:layout_marginRight="@dimen/d14"
+                    android:layout_marginLeft="@dimen/d14"
                     android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
@@ -270,6 +268,7 @@
                     android:id="@+id/activation_services_button"
                     android:layout_width="0dp"
                     android:layout_height="match_parent"
+                    android:layout_marginLeft="@dimen/d14"
                     android:layout_weight="1"
                     android:background="@drawable/shape_main_hos_txt_bg"
                     android:gravity="center"
@@ -277,7 +276,7 @@
                     android:textColor="@drawable/selector_bottom_btn_text_color"
                     android:textSize="16sp" />
             </LinearLayout>
-            </LinearLayout>
+        </LinearLayout>
 
 
     </RelativeLayout>

+ 1 - 2
callingdoor/src/main/res/layout/callingdoor_main_new.xml

@@ -345,8 +345,7 @@
             android:layout_width="match_parent"
             android:layout_height="match_parent"
             android:background="@mipmap/mom_bg"
-            android:visibility="gone"
-            />
+            android:visibility="gone" />
 
     </RelativeLayout>
 </layout>

File diff suppressed because it is too large
+ 587 - 642
callingdoor/src/main/res/layout/callingdoor_setting_main.xml


+ 1 - 0
callingdoor/src/main/res/layout/password_dialog_lay.xml

@@ -2,6 +2,7 @@
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:padding="10dp"
     android:gravity="center"
     android:orientation="vertical">
 

+ 21 - 1
middleware/src/main/code/com/wdkl/ncs/android/middleware/utils/AppUtil.java

@@ -139,6 +139,26 @@ public class AppUtil {
             Log.e("wdkl_app", "uninstall e:" + e.getMessage());
         }
     }
-    // 检查launch版本
 
+    //开启网络调试
+    public static boolean openNetworkDebug() {
+        try {
+            Process process = Runtime.getRuntime().exec(DEFAULT_SU_PATH);
+            if (null == process) {
+                return false;
+            }
+            DataOutputStream os = new DataOutputStream(process.getOutputStream());
+            os.writeBytes("setprop service.adb.tcp.port 5555\n");
+            os.writeBytes("stop adbd\n");
+            os.writeBytes("start adbd\n");
+            os.writeBytes("exit\n");
+            os.flush();
+
+            return true;
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+
+        return false;
+    }
 }