소스 검색

针对A20设备修改界面,修改一些bug,修改app在线升级问题等,暂未集成sip通话功能

weizhengliang 3 년 전
부모
커밋
76412b6b75
30개의 변경된 파일229개의 추가작업 그리고 137개의 파일을 삭제
  1. 8 2
      app/build.gradle
  2. BIN
      app/keystore_a20/callingdoor.jks
  3. 0 1
      app/src/main/AndroidManifest.xml
  4. 3 3
      app/src/main/code/com/wdkl/app/ncs/application/Application.kt
  5. 2 17
      bedlib/src/main/java/serialporttest/utils/SerialPortUtil.java
  6. 3 3
      build.gradle
  7. 1 1
      callingdoor/build.gradle
  8. 53 38
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt
  9. 0 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/SkyCallFragment.kt.bak
  10. 36 11
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AppUpdateHelper.java
  11. 4 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/HttpHelper.java
  12. 2 2
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/SOSHelper.java
  13. 18 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/SerialPortHelper.java
  14. 40 0
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/Utils.java
  15. 1 1
      callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/XCrashUtils.java
  16. 1 1
      callingdoor/src/main/res/drawable/ic_nursing.xml
  17. 1 1
      callingdoor/src/main/res/drawable/ic_nursing2.xml
  18. 10 11
      callingdoor/src/main/res/layout/callingdoor_main_lay.xml
  19. 15 15
      callingdoor/src/main/res/layout/item_bed.xml
  20. 7 7
      callingdoor/src/main/res/layout/qr_code_lay.xml
  21. 2 2
      callingdoor/src/main/res/layout/view_title_layout.xml
  22. 3 1
      callingdoor/src/main/res/values/dimens.xml
  23. 1 1
      common/build.gradle
  24. 2 2
      common/src/main/code/com/wdkl/ncs/android/lib/base/BaseApplication.kt
  25. 1 1
      common/src/main/code/com/wdkl/ncs/android/lib/utils/AppTool.kt
  26. 4 4
      common/src/main/code/com/wdkl/ncs/android/lib/utils/ExtendMethods.kt
  27. 3 3
      common/src/main/code/com/wdkl/ncs/android/lib/utils/UUID.kt
  28. 3 3
      middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/dto/TcpModel.java
  29. 2 2
      settings.gradle
  30. 3 3
      welcome/src/main/code/com/wdkl/ncs/android/component/welcome/activity/WelcomeActivity.kt

+ 8 - 2
app/build.gradle

@@ -12,6 +12,12 @@ kapt {
 android {
     // wuyq add for sign begin
     signingConfigs {
+        A20 {
+            storeFile file("keystore_a20/callingdoor.jks")
+            storePassword "123456"
+            keyAlias "wdkl"
+            keyPassword "123456"
+        }
         release {
             storeFile file("keystore_wuyuqing_3128/rk3128.jks")
             storePassword "111111"
@@ -53,12 +59,12 @@ android {
 
     buildTypes {
         release {
-            signingConfig signingConfigs.release
+            signingConfig signingConfigs.A20
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }
         debug {
-            signingConfig signingConfigs.debug
+            signingConfig signingConfigs.A20
             minifyEnabled false
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
         }

BIN
app/keystore_a20/callingdoor.jks


+ 0 - 1
app/src/main/AndroidManifest.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    android:sharedUserId="android.uid.system"
     package="com.wdkl.app.ncs">
     <!--android:sharedUserId="android.uid.system"-->
     <uses-permission android:name="android.permission.BLUETOOTH"/>

+ 3 - 3
app/src/main/code/com/wdkl/app/ncs/application/Application.kt

@@ -88,7 +88,7 @@ class Application : BaseApplication() {
         NetHelper.getInstance().init()
 
         //open serial port
-        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
             SerialPortUtil.getInstance().openSerialPort()
         }
 
@@ -108,8 +108,8 @@ class Application : BaseApplication() {
         //AnrFcExceptionUtil.getInstance(this).initFCException()
 
         //xCrash catcher
-        XCrashUtils().init(this)
+        //XCrashUtils().init(this)
 
-        Utils.checkCameraSupport()
+        //Utils.checkCameraSupport()
     }
 }

+ 2 - 17
bedlib/src/main/java/serialporttest/utils/SerialPortUtil.java

@@ -36,9 +36,6 @@ public class SerialPortUtil {
 
     public static SerialPortUtil instance = null;
 
-    public Timer timer ;
-    public TimerTask timerTask ;
-
     public SerialPortUtil() {
     }
 
@@ -292,19 +289,6 @@ public class SerialPortUtil {
         KeyValue[8] = -1;
     }
 
-    public void startHeartBeat() {
-        if (timer != null) timer.purge();
-        if (timerTask != null) timerTask.cancel();
-        timer = new Timer();
-        timerTask = new TimerTask() {
-            @Override
-            public void run() {
-                startHeart();
-            }
-        };
-        timer.schedule(timerTask, 0, 5000);
-    }
-
     /**
      * 心跳信号
      */
@@ -395,7 +379,8 @@ public class SerialPortUtil {
         } else if (getSystemVersion() >= 24) { //android7.0 = 24
             port = "ttyS1";//rk3128 android7.1
         } else {
-            port = "ttyS2";// a33 android4.4
+            //port = "ttyS2";// a33 android4.4
+            port = "ttyS7";// a20 android4.2
         }
         return port;
     }

+ 3 - 3
build.gradle

@@ -27,7 +27,7 @@ buildscript {
     /**
      * SDK最小支持版本
      */
-    ext.min_sdk_version = 24
+    ext.min_sdk_version = 17
 
     /**
      * SDK目标支持版本
@@ -47,12 +47,12 @@ buildscript {
     /**
      * APP版本码
      */
-    ext.app_version_code = 12
+    ext.app_version_code = 1
 
     /**
      * APP版本号
      */
-    ext.app_version = "1.1.12"
+    ext.app_version = "1.1.1"
 
     /**
      * 项目依赖库

+ 1 - 1
callingdoor/build.gradle

@@ -86,7 +86,7 @@ dependencies {
     //compile project(':libwebrtc')
     //compile project(':rtc-chat')
 
-    compile project(':janus')
+    //compile project(':janus')
 
     if(componentTag){
         debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5.1'

+ 53 - 38
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/activity/CallingdoorActivity.kt

@@ -1,6 +1,5 @@
 package com.wdkl.app.ncs.callingdoor.activity
 
-import android.app.AlarmManager
 import android.content.*
 import android.net.ConnectivityManager
 import android.os.*
@@ -12,7 +11,6 @@ import com.enation.javashop.android.jrouter.external.annotation.Router
 import com.enation.javashop.net.engine.model.NetState
 import com.example.yf_rk3288_api.YF_RK3288_API_Manager
 import com.google.gson.Gson
-import com.wdkl.app.ncs.callingdoor.fragment.SkyCallFragment
 import com.wdkl.app.ncs.callingdoor.BuildConfig
 import com.wdkl.app.ncs.callingdoor.R
 import com.wdkl.app.ncs.callingdoor.agreement.CallingdoorAgreement
@@ -48,7 +46,6 @@ import com.wdkl.ncs.android.middleware.tcp.enums.TcpType
 import com.wdkl.ncs.android.middleware.udp.ServerInfoUtil
 import com.wdkl.ncs.android.middleware.utils.AppUtil
 import com.wdkl.ncs.android.middleware.utils.CommonUtils
-import com.wdkl.ncs.janus.util.JanusConstant
 import kotlinx.android.synthetic.main.callingdoor_main_lay.*
 import kotlinx.android.synthetic.main.callingdoor_main_lay.app_version
 import kotlinx.android.synthetic.main.callingdoor_main_lay.room_action_call
@@ -67,7 +64,7 @@ import org.greenrobot.eventbus.Subscribe
 import org.greenrobot.eventbus.ThreadMode
 import serialporttest.utils.SerialPortUtil
 import java.io.*
-import java.lang.Process
+import java.util.*
 import java.util.concurrent.TimeUnit
 
 
@@ -104,7 +101,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     private var clickVersionTime : Long = 0
     private var clickCount = 1
 
-    private val uninstallApk = false
+    private val uninstallApk = true
 
     private var serverSuccess = false
     private var cancelRestart = false
@@ -156,22 +153,31 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         //更新状态图标
         updateNetState()
 
-        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
             //串口监听
             setSerialListener()
+            SerialPortHelper.startHeartBeat()
 
-            AppTool.Time.delay(3000) {
-                //打开MIC
-                SerialPortHelper.setMIC(true)
-                SerialPortHelper.setHandsFree(true)
-                SerialPortHelper.setSosLight("0")
-                //默认门灯白色
-                SerialPortHelper.setDoorLight(1, "111")
-            }
+            Thread {
+                try {
+                    Thread.sleep(2000)
+                    //打开MIC
+                    SerialPortHelper.setMIC(true)
+                    Thread.sleep(200)
+                    SerialPortHelper.setHandsFree(true)
+                    Thread.sleep(200)
+                    SerialPortHelper.setSosLight("0")
+                    //默认门灯白色
+                    Thread.sleep(200)
+                    SerialPortHelper.setDoorLight(1, "111")
+                } catch (e: Exception) {
+                    e.printStackTrace()
+                }
+            }.start()
 
             //设置默认时区为中国标准时间
-            val alarmManager = getSystemService(ALARM_SERVICE) as AlarmManager
-            alarmManager.setTimeZone("Asia/Shanghai")
+            //val alarmManager = getSystemService(ALARM_SERVICE) as AlarmManager
+            //alarmManager.setTimeZone("Asia/Shanghai")
         }
 
         app_version.text = "V" + BuildConfig.VERSION_NAME
@@ -182,7 +188,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         //记录app启动时间
         val lastTime = SettingConfig.getAppStartTime(activity)
         val currentTime = TimeHandle.getDateTime(System.currentTimeMillis(), "MM-dd HH:mm:ss")
-        debugLog(TAG, "app last start time: $lastTime, current time: $currentTime")
+        //debugLog(TAG, "app last start time: $lastTime, current time: $currentTime")
+        Log.d(TAG, "app last start time: $lastTime, current time: $currentTime")
         SettingConfig.setAppStartTime(activity, currentTime)
 
         VoiceManagerUtil.setCallVoice(activity, SettingConfig.getExtensionCallVolume(activity))
@@ -201,9 +208,11 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
 
         checkServer()
 
-        if ("rk3128".equals(Build.MODEL)) {
+        /*if ("rk3128".equals(Build.MODEL)) {
             checkLaunch()
-        }
+        }*/
+
+        Log.d(TAG, "app data file: " + filesDir.absoluteFile + ", canWrite: " + filesDir.absoluteFile.canWrite())
     }
 
     private fun checkAppExist() : Boolean {
@@ -221,7 +230,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     private fun uninstallApp() {
-        val process: Process
+        val process: java.lang.Process
         val printWriter: PrintWriter
         try {
             process = Runtime.getRuntime().exec("su")
@@ -434,7 +443,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
 
             if (Constant.inNursing) {
                 Constant.inNursing = false
-                if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+                if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
                     SerialPortHelper.setDoorLight(1, "111") //白色
                 }
                 //room_action_nurse.text = "进入护理"
@@ -446,7 +455,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                 }
             } else {
                 Constant.inNursing = true
-                if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+                if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
                     SerialPortHelper.setDoorLight(1, Constant.nursingColor) //绿色
                 }
                 //room_action_nurse.text = "退出护理"
@@ -608,8 +617,6 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     private fun setSerialListener() {
         SerialPortUtil.getInstance().setOnDataReceiveListener(this)
         SerialPortUtil.getInstance().setOnDataReceiveStringListener(this)
-        //开启串口心跳
-        SerialPortUtil.getInstance().startHeartBeat()
     }
 
     override fun checkAppVersion() {
@@ -637,7 +644,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         }
         MediaPlayHelper.getInstance().stopMusic()
 
-        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
             SerialPortUtil.getInstance().closeHeart()
             SerialPortUtil.getInstance().closeSerialPort()
         }
@@ -711,8 +718,8 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         Constant.TCP_PORT = data.tcpPort
         Constant.TCP_HEART_BEAT = data.tcpIdleSeconds
 
-        JanusConstant.JANUS_URL = "ws://" + data.rtcLocalIp + ":" + data.rtcPort
-        JanusConstant.STUN_SERVER = arrayOf<String>(data.stunServer)
+        //JanusConstant.JANUS_URL = "ws://" + data.rtcLocalIp + ":" + data.rtcPort
+        //JanusConstant.STUN_SERVER = arrayOf<String>(data.stunServer)
         //JanusConstant.TURN_SERVER = data.turnServer
 
         //开启TCP连接
@@ -955,13 +962,13 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
         //通话之前先判断webrtc socket和tcp是否连接正常,否则不能建立通话
         if (Constant.TCP_CONNECTED) {
             //去电界面
-            Constant.CALL_TYPE = type
+            /*Constant.CALL_TYPE = type
             Constant.CALL_STATE = Constant.CALL_OUTGOING
             var fragment = SkyCallFragment()
             var bundle = Bundle()
             bundle.putInt("call_state", 0)
             fragment.arguments = bundle
-            addCallFragment(fragment)
+            addCallFragment(fragment)*/
         } else {
             showMessage("通话服务或网络未连接,请检查网络稍后再试")
         }
@@ -974,12 +981,12 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
             //去电界面
             Constant.CALL_TYPE = type
             Constant.CALL_STATE = Constant.CALL_OUTGOING
-            var fragment = SkyCallFragment()
+            /*var fragment = SkyCallFragment()
             var bundle = Bundle()
             bundle.putInt("call_state", 2)
             bundle.putInt("bed_id", bedId)
             fragment.arguments = bundle
-            addCallFragment(fragment)
+            addCallFragment(fragment)*/
         } else {
             showMessage("通话服务或网络未连接,请检查网络稍后再试")
         }
@@ -1020,12 +1027,12 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                             Constant.CALL_STATE = Constant.CALL_INCOMING
                             if (Constant.TCP_CONNECTED && !TextUtils.isEmpty(Constant.SIP_ID)) {
                                 //来电界面
-                                var fragment = SkyCallFragment()
+                                /*var fragment = SkyCallFragment()
                                 var bundle = Bundle()
                                 bundle.putInt("call_state", 1)
                                 bundle.putSerializable("tcp_model", tcpModel)
                                 fragment.arguments = bundle
-                                addCallFragment(fragment)
+                                addCallFragment(fragment)*/
                             } else {
                                 showMessage("服务未连接或sipId为空")
                                 Constant.CALL_STATE = Constant.CALL_STANDBY
@@ -1061,7 +1068,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                             val interactionVO = Gson().fromJson(tcpModel.data.toString(), InteractionVO::class.java)
                             nursingInteId = interactionVO.id
                         } else {
-                            if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+                            if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
                                 DoorLightHelper.handleDoorLight(tcpModel)
                             }
                         }
@@ -1073,7 +1080,7 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
                             Log.d(TAG, "set sys time1: $time")
                         } catch (e: Exception) {
                             //"20211213:092314"
-                            val timeStr = TimeHandle.getDateTime(time, "yyyyMMdd.hhmmss")
+                            val timeStr = TimeHandle.getDateTime(time, "yyyyMMdd.HHmmss")
                             AppUtil.setSysTime(timeStr)
                             Log.d(TAG, "set sys time2: $timeStr")
                         }
@@ -1173,15 +1180,23 @@ class CallingdoorActivity :BaseActivity<CallingdoorActivityPresenter, Callingdoo
     }
 
     private fun updateSettings(forceSet: Boolean) {
-        val  currentTimestamp = System.currentTimeMillis()
-
+        val currentTimestamp = System.currentTimeMillis()
         //白天起始时间戳
         var date = TimeHandle.getDateTime("yyyy-MM-dd")
         var dayStartTimeStamp = TimeHandle.dateToStamp(date+" "+SettingConfig.getInitialDayTime(this)+":00", "yyyy-MM-dd HH:mm:ss")
         //白天结束时间戳
         var endOfDayTimeStamp = TimeHandle.dateToStamp(date+" "+SettingConfig.getEndOfDay(this)+":00", "yyyy-MM-dd HH:mm:ss")
-
         val curInday = dayStartTimeStamp < currentTimestamp && currentTimestamp < endOfDayTimeStamp
+
+        /*val beginTime = SettingConfig.getInitialDayTime(this)
+        val endTime = SettingConfig.getEndOfDay(this)
+        val beginH = beginTime.substring(0, 2).toInt()
+        val beginM = beginTime.substring(3, 5).toInt()
+        val endH = endTime.substring(0, 2).toInt()
+        val endM = endTime.substring(3, 5).toInt()
+        val curInday = Utils.atTheCurrentTime(beginH, beginM, endH, endM)
+        Log.d(TAG, "curInday: $curInday, beginH: $beginH, beginM: $beginM, endH: $endH, endH: $endM")*/
+
         if (curInday) {
             //当前是白天并且原来不是白天
             if (Constant.day_state != 0 || forceSet) {

callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/SkyCallFragment.kt → callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/fragment/SkyCallFragment.kt.bak


+ 36 - 11
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/AppUpdateHelper.java

@@ -14,6 +14,7 @@ import android.support.v4.content.FileProvider;
 import android.util.Log;
 
 import com.wdkl.ncs.android.component.welcome.activity.WelcomeActivity;
+import com.wdkl.ncs.android.lib.base.BaseApplication;
 
 import java.io.BufferedReader;
 import java.io.File;
@@ -28,7 +29,9 @@ public class AppUpdateHelper {
     /**
      * 下载的APK文件绝对路径
      */
-    public static final String FILE_APK_PATH = Environment.getExternalStorageDirectory() + "/CallingDoor";
+    //public static final String FILE_APK_PATH = Environment.getExternalStorageDirectory() + "/CallingDoor";
+    public static final String FILE_APK_PATH = BaseApplication.appContext.getFilesDir().getAbsolutePath() + "/CallingDoor";
+
     /**
      * 下载的APK文件的文件名
      */
@@ -41,6 +44,13 @@ public class AppUpdateHelper {
                 return;
             }
 
+            String cmd1 = "chmod 777 " + FILE_APK_PATH;
+            String cmd2 = "chmod 777 " + FILE_APK_PATH + "/" + FILE_APK_NAME;
+            Runtime runtime = Runtime.getRuntime();
+            runtime.exec(cmd1);
+            runtime.exec(cmd2);
+
+
             Intent intent = new Intent(Intent.ACTION_VIEW);
             intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//安装完成后打开新版本
             intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); // 给目标应用一个临时授权
@@ -55,6 +65,7 @@ public class AppUpdateHelper {
             }
             context.startActivity(intent);
         } catch (Exception e) {
+            e.printStackTrace();
         }
     }
 
@@ -119,12 +130,13 @@ public class AppUpdateHelper {
         return false;
     }
 
-    public static boolean silentInstall(Context context, String apkPath) {
+    public static boolean silentInstall(Context context) {
+        String apkPath = FILE_APK_PATH + "/" + FILE_APK_NAME;
         PackageManager packageManager = context.getPackageManager();
         Class pmClz = packageManager.getClass();
         try {
+            Log.d(TAG, "apk path: " + apkPath);
             if (Build.VERSION.SDK_INT >= 21) {
-                Log.d(TAG, "apk path: " + apkPath);
                 Class aClass = Class.forName("android.app.PackageInstallObserver");
                 Constructor constructor = aClass.getDeclaredConstructor();
                 constructor.setAccessible(true);
@@ -140,11 +152,14 @@ public class AppUpdateHelper {
             return true;
         } catch (Exception e) {
             Log.e(TAG, e.toString());
+            e.printStackTrace();
         }
         return false;
     }
 
-    public static boolean installApp(String packageName, String apkPath) {
+    public static boolean installApp() {
+        String apkPath = FILE_APK_PATH + "/" + FILE_APK_NAME;
+        String packageName = BaseApplication.appContext.getPackageName();
         Process process = null;
         BufferedReader successResult = null;
         BufferedReader errorResult = null;
@@ -188,6 +203,12 @@ public class AppUpdateHelper {
         Process process;
         PrintWriter printWriter;
         try {
+            String cmd1 = "chmod 777 " + FILE_APK_PATH;
+            String cmd2 = "chmod 777 " + FILE_APK_PATH + "/" + FILE_APK_NAME;
+            Runtime runtime = Runtime.getRuntime();
+            runtime.exec(cmd1);
+            runtime.exec(cmd2);
+
             process = Runtime.getRuntime().exec("su");
             printWriter = new PrintWriter(process.getOutputStream());
             printWriter.println("pm install -r " + path);
@@ -207,20 +228,24 @@ public class AppUpdateHelper {
     }
 
     public static void reboot(Context context) {
+        Log.e(TAG, "start reboot device...");
         try {
-            Intent intent = new Intent(Intent.ACTION_REBOOT);
-            intent.putExtra("nowait", 1);
-            intent.putExtra("interval", 1);
-            intent.putExtra("window", 0);
-            context.sendBroadcast(intent);
+            if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+                Intent intent = new Intent(Intent.ACTION_REBOOT);
+                intent.putExtra("nowait", 1);
+                intent.putExtra("interval", 1);
+                intent.putExtra("window", 0);
+                context.sendBroadcast(intent);
 
-            if ("rk3128".equals(Build.MODEL)) {
                 SerialPortHelper.resetDevice();
+            } else if ("WDMK_I".equals(Build.MODEL)){
+                //A20
+                Process process = Runtime.getRuntime().exec(new String[]{"su", "-c", "reboot"});
+                process.waitFor();
             }
         } catch (Exception e) {
             e.printStackTrace();
         }
-
     }
 
     public static void restartApp(Context context) {

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

@@ -1,5 +1,6 @@
 package com.wdkl.app.ncs.callingdoor.helper;
 
+import android.content.Context;
 import android.util.Log;
 
 import java.io.File;
@@ -105,7 +106,7 @@ public class HttpHelper {
                         //int progress = (int) (sum * 1.0f / total * 100);
                         float sp = (float) sum / (float) total;
                         int progress = (int) (sp * 100);
-                        Log.d("download", "progress==" + progress);
+                        //Log.d("download", "progress==" + progress);
                         if (listener != null) {
                             listener.onDownloading(progress);// 下载中
                         }
@@ -116,6 +117,7 @@ public class HttpHelper {
                     }
                 } catch (Exception e) {
                     Log.d("download", "Exception==");
+                    e.printStackTrace();
                     if (listener != null) {
                         listener.onDownloadFailed();
                     }
@@ -127,6 +129,7 @@ public class HttpHelper {
                             fos.close();
                     } catch (IOException e) {
                         Log.d("download", "IOException==");
+                        e.printStackTrace();
                     }
                 }
             }

+ 2 - 2
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/SOSHelper.java

@@ -22,7 +22,7 @@ public class SOSHelper {
     };
 
     public static void sosStart() {
-        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
             SerialPortHelper.setSosLight("2");
             OtherUtil.sendSosCall(Constant.DEVICE_ID);
 
@@ -32,7 +32,7 @@ public class SOSHelper {
     }
 
     public static void sosStop() {
-        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+        if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
             handler.removeCallbacksAndMessages(null);
             if (Constant.day_state == 1) {
                 SerialPortHelper.setSosLight("1");

+ 18 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/SerialPortHelper.java

@@ -1,9 +1,16 @@
 package com.wdkl.app.ncs.callingdoor.helper;
 
+import java.util.TimerTask;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+
 import serialporttest.utils.SerialPortUtil;
 
 public class SerialPortHelper {
 
+    private final static ScheduledExecutorService executor = Executors.newSingleThreadScheduledExecutor();
+
     /**
      * 麦克风切换控制
      */
@@ -54,4 +61,15 @@ public class SerialPortHelper {
         //SerialPortUtil.getInstance().sendCommand(SerialPortUtil.NET_STATUS , "1", "F");
         SerialPortUtil.getInstance().systemRestart();
     }
+
+    public static void startHeartBeat() {
+        TimerTask timerTask = new TimerTask() {
+            @Override
+            public void run() {
+                SerialPortUtil.getInstance().startHeart();
+            }
+        };
+
+        executor.scheduleAtFixedRate(timerTask,1,5, TimeUnit.SECONDS);
+    }
 }

+ 40 - 0
callingdoor/src/main/java/com/wdkl/app/ncs/callingdoor/helper/Utils.java

@@ -2,6 +2,7 @@ package com.wdkl.app.ncs.callingdoor.helper;
 
 import android.hardware.Camera;
 import android.text.TextUtils;
+import android.text.format.Time;
 
 import com.wdkl.ncs.android.middleware.common.Constant;
 import com.wdkl.ncs.android.middleware.model.vo.FrameBedVO;
@@ -29,4 +30,43 @@ public class Utils {
     public static ArrayList<FrameBedVO> getInBedVOS() {
         return bedVOS;
     }
+
+
+    /***
+     *
+     * @param beginHour 开始小时       比如   23
+     * @param beginMin  开始小时的分钟  比如  00
+     * @param endHour   结束小时        比如  5
+     * @param endMin    结束小时的分钟   比如 00
+     * @return         true表示范围内   否则false
+     */
+    public static boolean atTheCurrentTime(int beginHour, int beginMin, int endHour, int endMin) {
+        boolean result = false;
+        final long aDayInMillis = 1000 * 60 * 60 * 24;
+        final long currentTimeMillis = System.currentTimeMillis();
+        Time now = new Time();
+        now.set(currentTimeMillis);
+        Time startTime = new Time();
+        startTime.set(currentTimeMillis);
+        startTime.hour = beginHour;
+        startTime.minute = beginMin;
+        Time endTime = new Time();
+        endTime.set(currentTimeMillis);
+        endTime.hour = endHour;
+        endTime.minute = endMin;
+        /**跨天的特殊情况(比如23:00-2:00)*/
+        if (!startTime.before(endTime)) {
+            startTime.set(startTime.toMillis(true) - aDayInMillis);
+            result = !now.before(startTime) && !now.after(endTime); // startTime <= now <= endTime
+            Time startTimeInThisDay = new Time();
+            startTimeInThisDay.set(startTime.toMillis(true) + aDayInMillis);
+            if (!now.before(startTimeInThisDay)) {
+                result = true;
+            }
+        } else {
+            /**普通情况(比如5:00-10:00)*/
+            result = !now.before(startTime) && !now.after(endTime); // startTime <= now <= endTime
+        }
+        return result;
+    }
 }

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

@@ -95,7 +95,7 @@ public class XCrashUtils {
                 debug(logPath, null);
             }*/
 
-            if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL)) {
+            if ("rk3128".equals(Build.MODEL) || "rk3368".equals(Build.MODEL) || "WDMK_I".equals(Build.MODEL)) {
                 AppUpdateHelper.reboot(app);
             } else {
                 restartApp();

+ 1 - 1
callingdoor/src/main/res/drawable/ic_nursing.xml

@@ -1,5 +1,5 @@
 <vector android:height="16dp" android:tint="#FFFFFF"
     android:viewportHeight="24.0" android:viewportWidth="24.0"
     android:width="16dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
 </vector>

+ 1 - 1
callingdoor/src/main/res/drawable/ic_nursing2.xml

@@ -1,5 +1,5 @@
 <vector android:height="24dp" android:tint="#FFFFFF"
     android:viewportHeight="24" android:viewportWidth="24"
     android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="@android:color/white" android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
+    <path android:fillColor="#FFFFFF" android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
 </vector>

+ 10 - 11
callingdoor/src/main/res/layout/callingdoor_main_lay.xml

@@ -38,13 +38,12 @@
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_alignParentBottom="true"
-                android:layout_marginTop="10dp"
                 android:layout_marginBottom="10dp"
                 android:paddingTop="10dp"
                 android:paddingBottom="10dp"
                 android:gravity="center"
                 android:text="版本"
-                android:textSize="20sp"
+                android:textSize="18sp"
                 android:textColor="@color/main_color"/>
             <TextView
                 android:id="@+id/room_action_nurse"
@@ -58,63 +57,63 @@
                 android:padding="10dp"
                 android:gravity="center_vertical"
                 android:text="进入护理"
-                android:textSize="20sp"
+                android:textSize="18sp"
                 android:textColor="@drawable/selector_bottom_btn_text_color"/>
             <TextView
                 android:id="@+id/room_action_support"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_above="@id/room_action_nurse"
-                android:layout_marginBottom="30dp"
+                android:layout_marginBottom="24dp"
                 android:background="@mipmap/bg_bottom_btn"
                 android:drawableLeft="@mipmap/ic_support"
                 android:drawablePadding="6dp"
                 android:padding="10dp"
                 android:gravity="center_vertical"
                 android:text="请求增援"
-                android:textSize="20sp"
+                android:textSize="18sp"
                 android:textColor="@drawable/selector_bottom_btn_text_color"/>
             <TextView
                 android:id="@+id/room_cancel_call"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_above="@id/room_action_support"
-                android:layout_marginBottom="30dp"
+                android:layout_marginBottom="24dp"
                 android:background="@mipmap/bg_bottom_btn"
                 android:drawableLeft="@mipmap/ic_call"
                 android:drawablePadding="6dp"
                 android:padding="10dp"
                 android:gravity="center_vertical"
                 android:text="取消呼叫"
-                android:textSize="20sp"
+                android:textSize="18sp"
                 android:textColor="@drawable/selector_bottom_btn_text_color" />
             <TextView
                 android:id="@+id/room_action_call"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_above="@id/room_cancel_call"
-                android:layout_marginBottom="30dp"
+                android:layout_marginBottom="24dp"
                 android:background="@mipmap/bg_bottom_btn"
                 android:drawableLeft="@mipmap/ic_call"
                 android:drawablePadding="6dp"
                 android:padding="10dp"
                 android:gravity="center_vertical"
                 android:text="呼叫护士"
-                android:textSize="20sp"
+                android:textSize="18sp"
                 android:textColor="@drawable/selector_bottom_btn_text_color"/>
             <TextView
                 android:id="@+id/room_action_call_bed"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content"
                 android:layout_above="@id/room_action_call"
-                android:layout_marginBottom="30dp"
+                android:layout_marginBottom="24dp"
                 android:background="@mipmap/bg_bottom_btn"
                 android:drawableLeft="@mipmap/ic_call"
                 android:drawablePadding="6dp"
                 android:padding="10dp"
                 android:gravity="center_vertical"
                 android:text="呼叫床位"
-                android:textSize="20sp"
+                android:textSize="18sp"
                 android:textColor="@drawable/selector_bottom_btn_text_color" />
         </RelativeLayout>
 

+ 15 - 15
callingdoor/src/main/res/layout/item_bed.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
-    android:layout_width="290dp"
+    android:layout_width="288dp"
     android:layout_height="match_parent"
     android:paddingLeft="4dp"
     android:orientation="vertical">
@@ -11,9 +11,9 @@
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
         android:padding="4dp"
-        android:text="01床"
+        android:text="-床"
         android:textColor="@color/main_color"
-        android:textSize="36sp"/>
+        android:textSize="32sp"/>
 
     <LinearLayout
         android:layout_width="match_parent"
@@ -46,7 +46,7 @@
                     android:paddingLeft="4dp"
                     android:text="暂无"
                     android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
+                    android:textSize="@dimen/nurse_config_title_font"/>
                 <TextView
                     android:id="@+id/nurse_config_item_value1"
                     android:layout_width="match_parent"
@@ -57,7 +57,7 @@
                     android:gravity="right"
                     android:text="暂无"
                     android:textColor="@color/main_color"
-                    android:textSize="22sp"/>
+                    android:textSize="@dimen/nurse_config_value_font"/>
             </RelativeLayout>
 
             <RelativeLayout
@@ -77,7 +77,7 @@
                     android:paddingLeft="4dp"
                     android:text="暂无"
                     android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
+                    android:textSize="@dimen/nurse_config_title_font"/>
                 <TextView
                     android:id="@+id/nurse_config_item_value2"
                     android:layout_width="match_parent"
@@ -88,7 +88,7 @@
                     android:gravity="right"
                     android:text="暂无"
                     android:textColor="@color/main_color"
-                    android:textSize="22sp"/>
+                    android:textSize="@dimen/nurse_config_value_font"/>
             </RelativeLayout>
 
             <RelativeLayout
@@ -108,7 +108,7 @@
                     android:paddingLeft="4dp"
                     android:text="暂无"
                     android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
+                    android:textSize="@dimen/nurse_config_title_font"/>
                 <TextView
                     android:id="@+id/nurse_config_item_value3"
                     android:layout_width="match_parent"
@@ -119,7 +119,7 @@
                     android:gravity="right"
                     android:text="暂无"
                     android:textColor="@color/main_color"
-                    android:textSize="22sp"/>
+                    android:textSize="@dimen/nurse_config_value_font"/>
             </RelativeLayout>
 
             <RelativeLayout
@@ -139,7 +139,7 @@
                     android:paddingLeft="4dp"
                     android:text="暂无"
                     android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
+                    android:textSize="@dimen/nurse_config_title_font"/>
                 <TextView
                     android:id="@+id/nurse_config_item_value4"
                     android:layout_width="match_parent"
@@ -150,7 +150,7 @@
                     android:gravity="right"
                     android:text="暂无"
                     android:textColor="@color/main_color"
-                    android:textSize="22sp"/>
+                    android:textSize="@dimen/nurse_config_value_font"/>
             </RelativeLayout>
 
             <RelativeLayout
@@ -170,7 +170,7 @@
                     android:paddingLeft="4dp"
                     android:text="暂无"
                     android:textColor="@color/text_name_color"
-                    android:textSize="18sp"/>
+                    android:textSize="@dimen/nurse_config_title_font"/>
                 <TextView
                     android:id="@+id/nurse_config_item_value5"
                     android:layout_width="match_parent"
@@ -181,7 +181,7 @@
                     android:gravity="right"
                     android:text="暂无"
                     android:textColor="@color/main_color"
-                    android:textSize="22sp"/>
+                    android:textSize="@dimen/nurse_config_value_font"/>
             </RelativeLayout>
 
         </LinearLayout>
@@ -204,7 +204,7 @@
                 android:gravity="center"
                 android:text="王老五"
                 android:textColor="@color/black"
-                android:textSize="24sp"/>
+                android:textSize="22sp"/>
 
             <TextView
                 android:id="@+id/bed_customer_age"
@@ -214,7 +214,7 @@
                 android:drawableLeft="@mipmap/ic_gender_male"
                 android:drawablePadding="4dp"
                 android:text="55岁"
-                android:textSize="20sp"/>
+                android:textSize="18sp"/>
 
             <ImageView
                 android:id="@+id/bed_doctor_icon"

+ 7 - 7
callingdoor/src/main/res/layout/qr_code_lay.xml

@@ -26,7 +26,7 @@
             android:layout_marginLeft="40dp"
             android:text="设备ID:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/tv_local_ip"
@@ -36,7 +36,7 @@
             android:layout_marginLeft="40dp"
             android:text="本机IP:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/tv_server_ip"
@@ -46,7 +46,7 @@
             android:layout_marginLeft="40dp"
             android:text="服务器:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/tv_local_mac"
@@ -56,7 +56,7 @@
             android:layout_marginLeft="40dp"
             android:text="本机MAC:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/tv_device_sn"
@@ -66,7 +66,7 @@
             android:layout_marginLeft="40dp"
             android:text="设备序列号:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/tv_app_version"
@@ -76,7 +76,7 @@
             android:layout_marginLeft="40dp"
             android:text="版本信息:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
 
         <TextView
             android:id="@+id/tv_mcu_version"
@@ -86,7 +86,7 @@
             android:layout_marginLeft="40dp"
             android:text="MCU:"
             android:textColor="@color/black"
-            android:textSize="20sp" />
+            android:textSize="16sp" />
     </LinearLayout>
 
     <RelativeLayout

+ 2 - 2
callingdoor/src/main/res/layout/view_title_layout.xml

@@ -32,8 +32,8 @@
         android:layout_height="wrap_content"
         android:layout_centerHorizontal="true"
         android:layout_centerVertical="true"
-        android:format12Hour="yyyy-MM-dd HH:mm EEEE"
-        android:format24Hour="yyyy-MM-dd HH:mm EEEE"
+        android:format12Hour="yyyy-MM-dd aah:mm EEEE"
+        android:format24Hour="yyyy-MM-dd kk:mm EEEE"
         android:timeZone="GMT+8"
         android:textColor="@color/main_color"
         android:textSize="@dimen/font_size_20" />

+ 3 - 1
callingdoor/src/main/res/values/dimens.xml

@@ -50,7 +50,9 @@
     <dimen name="tab_height">48dp</dimen>
 
     <!--护理项高度-->
-    <dimen name="nurse_config_item_height">60dp</dimen>
+    <dimen name="nurse_config_item_height">56dp</dimen>
+    <dimen name="nurse_config_title_font">16sp</dimen>
+    <dimen name="nurse_config_value_font">20sp</dimen>
     
     <!--控件边距-->
     <dimen name="margin_to_side_5">5dp</dimen>

+ 1 - 1
common/build.gradle

@@ -248,7 +248,7 @@ dependencies {
     /**
      * google
      */
-    compile 'com.google.guava:guava:23.0'
+    //compile 'com.google.guava:guava:23.0'
 }
 
 //tasks.withType(JavaCompile) {

+ 2 - 2
common/src/main/code/com/wdkl/ncs/android/lib/base/BaseApplication.kt

@@ -48,10 +48,10 @@ open class BaseApplication : MultiDexApplication() {
         closeAndroidPDialog()
         AppTool.SystemUI.initStatusBarHeight(applicationContext)
         /**Logger初始化*/
-        LoggerFactory.create(baseContext)
+        /*LoggerFactory.create(baseContext)
                      .diskCache()
                      .setTag("WdklLog")
-                     .build()
+                     .build()*/
         /**初始化Application对象*/
         appContext = this
         /**开始Activity生命周期监听,并启动AutoClearHelper*/

+ 1 - 1
common/src/main/code/com/wdkl/ncs/android/lib/utils/AppTool.kt

@@ -286,7 +286,7 @@ object AppTool {
         @JvmStatic
         fun setScreenOffTimeOut(context: Context, timeout: Int) {
             try {
-                if (!"rk3128".equals(Build.MODEL) && !"rk3368".equals(Build.MODEL)) {
+                if (!"rk3128".equals(Build.MODEL) && !"rk3368".equals(Build.MODEL) && !"WDMK_I".equals(Build.MODEL)) {
                     Settings.System.putInt(
                         context.contentResolver,
                         Settings.System.SCREEN_OFF_TIMEOUT, timeout

+ 4 - 4
common/src/main/code/com/wdkl/ncs/android/lib/utils/ExtendMethods.kt

@@ -56,8 +56,8 @@ typealias ObserableString = ObservableField<String>
  * @param  message 日志信息
  */
 fun debugLog(tag: String?, message: String?) {
-    val st = Throwable().stackTrace[1]
-    LoggerFactory.getLogger().i("【Tag -> $tag】 >>>>>>>>>>", "Message -> $message >>>>>>>>>>>>>>>>>>>>>>>>>> 【Location ->Class:${st.className} - Method:${st.methodName} - Line:${st.lineNumber}】 ")
+    //val st = Throwable().stackTrace[1]
+    //LoggerFactory.getLogger().i("【Tag -> $tag】 >>>>>>>>>>", "Message -> $message >>>>>>>>>>>>>>>>>>>>>>>>>> 【Location ->Class:${st.className} - Method:${st.methodName} - Line:${st.lineNumber}】 ")
 }
 
 /**
@@ -69,8 +69,8 @@ fun debugLog(tag: String?, message: String?) {
  * @param  message 日志信息
  */
 fun errorLog(tag: String, message: String) {
-    val st = Throwable().stackTrace[1]
-    LoggerFactory.getLogger().e("【Tag -> $tag】 >>>>>>>>>>", "Message -> $message >>>>>>>>>>>>>>>>>>>>>>>>>> 【Location ->Class:${st.className} - Method:${st.methodName} - Line:${st.lineNumber}】 ")
+    //val st = Throwable().stackTrace[1]
+    //LoggerFactory.getLogger().e("【Tag -> $tag】 >>>>>>>>>>", "Message -> $message >>>>>>>>>>>>>>>>>>>>>>>>>> 【Location ->Class:${st.className} - Method:${st.methodName} - Line:${st.lineNumber}】 ")
 }
 
 /**

+ 3 - 3
common/src/main/code/com/wdkl/ncs/android/lib/utils/UUID.kt

@@ -34,7 +34,7 @@ class UUID {
         @SuppressLint("MissingPermission", "WifiManagerLeak", "HardwareIds")
         private fun get() : String{
             //refreshUUID("abcd1234")
-            var macAddress = ACache.get(BaseApplication.appContext).getAsString("UUID")
+            /*var macAddress = ACache.get(BaseApplication.appContext).getAsString("UUID")
             if (macAddress == null){
                 val wifiManager :WifiManager? = BaseApplication.appContext.getSystemService(Context.WIFI_SERVICE) as WifiManager
                 val info = wifiManager?.connectionInfo
@@ -46,8 +46,8 @@ class UUID {
                 if (null != info) {
                     macAddress = info.macAddress
                 }
-            }
-            return macAddress
+            }*/
+            return "0123456789"
         }
 
         fun refreshUUID(id : String){

+ 3 - 3
middleware/src/main/code/com/wdkl/ncs/android/middleware/tcp/dto/TcpModel.java

@@ -1,11 +1,11 @@
 package com.wdkl.ncs.android.middleware.tcp.dto;
 
+import android.text.TextUtils;
+
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
-import com.google.common.base.Strings;
 import com.wdkl.ncs.android.middleware.model.dos.DeviceDO;
 import com.wdkl.ncs.android.middleware.model.dos.FrameDO;
-import com.wdkl.ncs.android.middleware.model.vo.InteractionVO;
 import com.wdkl.ncs.android.middleware.tcp.enums.TcpAction;
 import com.wdkl.ncs.android.middleware.tcp.enums.TcpType;
 
@@ -88,7 +88,7 @@ public class TcpModel implements Serializable {
     }
 
     public static TcpModel getModelByJson(String tcpModelJsonString){
-        if (Strings.isNullOrEmpty(tcpModelJsonString)){
+        if (TextUtils.isEmpty(tcpModelJsonString)){
             return null;
         }
         TcpModel tcpModel = new TcpModel();

+ 2 - 2
settings.gradle

@@ -1,3 +1,3 @@
-include ':app', ':common', ':welcome', ':home', ':resource', ':middleware', ':extra', ':callingdoor', ':bedlib', ':janus'
+include ':app', ':common', ':welcome', ':home', ':resource', ':middleware', ':extra', ':callingdoor', ':bedlib'
 
-//'webrtc', 'rtc-chat', 'libwebrtc'
+//'webrtc', 'rtc-chat', 'libwebrtc', ':janus'

+ 3 - 3
welcome/src/main/code/com/wdkl/ncs/android/component/welcome/activity/WelcomeActivity.kt

@@ -159,7 +159,7 @@ class WelcomeActivity :BaseActivity<WelcomePresenter, ActivityWelcomeBinding>(),
      */
     override fun onResume() {
         super.onResume()
-        reloadWithVoiNet()
+        //reloadWithVoiNet()
     }
 
     /**
@@ -185,7 +185,7 @@ class WelcomeActivity :BaseActivity<WelcomePresenter, ActivityWelcomeBinding>(),
         },onWifi = {
             debugLog("Welcome","wifi")
         },offline = {
-            noneNetDo()
+            //noneNetDo()
         })
     }
 
@@ -233,6 +233,6 @@ class WelcomeActivity :BaseActivity<WelcomePresenter, ActivityWelcomeBinding>(),
      * 重写返回监听事件 直接销毁页面
      */
     override fun onBackPressed() {
-        finish()
+        //finish()
     }
 }