BaseCommonLib/.gitignore | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
BaseCommonLib/consumer-rules.pro | 补丁 | 查看 | 原始文档 | blame | 历史 | |
BaseCommonLib/proguard-rules.pro | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/DB/exam_status/ExamStatusDao.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/app.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/util/DataInit.kt | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/java/safeluck/drive/evaluation/util/Utils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
BaseCommonLib/.gitignore
New file @@ -0,0 +1 @@ /build BaseCommonLib/consumer-rules.pro
BaseCommonLib/proguard-rules.pro
New file @@ -0,0 +1,21 @@ # Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle. # # For more details, see # http://developer.android.com/guide/developing/tools/proguard.html # If your project uses WebView with JS, uncomment the following # and specify the fully qualified class name to the JavaScript interface # class: #-keepclassmembers class fqcn.of.javascript.interface.for.webview { # public *; #} # Uncomment this to preserve the line number information for # debugging stack traces. #-keepattributes SourceFile,LineNumberTable # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile app/src/main/java/safeluck/drive/evaluation/DB/exam_status/ExamStatusDao.java
@@ -24,9 +24,9 @@ @Query("update exam_status set startExam =:startexam") void updateStartExam(int startexam); @Query("select startExam from exam_status where map_id=1") @Query("select startExam from exam_status where map_id=-1") LiveData<Integer> getStartExam(); @Query("select startExam from exam_status where map_id=1") @Query("select startExam from exam_status where map_id=-1") int getStartExamInt(); @Query("delete from exam_status where map_id >-1") app/src/main/java/safeluck/drive/evaluation/app.java
@@ -32,6 +32,7 @@ import org.json.JSONObject; import java.util.Date; import java.util.concurrent.Executors; import safeluck.drive.evaluation.DB.WorkRoomDataBase; import safeluck.drive.evaluation.DB.appstatusdb.AppStatusWorker; @@ -105,8 +106,9 @@ private void initData() { CThreadPoolExecutor.runInBackground(()->{ MyLog.i("开始初始化数据发送地图/车辆/mcu升级文件/考试状态"); int type = WorkRoomDataBase.getWorkRoomDataBase(getApplicationContext()).getExamStatusDao().getStartExamInt(); MyLog.i("开始初始化数据发送地图/车辆/mcu升级文件/考试状态="+type); ExamPlatformData.getInstance().setExamType(type); // OneTimeWorkRequest examStatausOutWorker = OneTimeWorkRequest.from(ExamStatusOutWorker.class); sendMapInfo(); @@ -144,7 +146,7 @@ int enter_status = -1; @Override public void callBackMsg(final int cmd, String json) { String strConent = String.format("收到命令[%d],Json内容为%s", cmd, json); String strConent = String.format("收到命令[%d],Json内容为%s,线程号=%d,时间=%s", cmd, json,Thread.currentThread().getId(),Utils.formatTimeYYMMDDHHmmSSSSS(System.currentTimeMillis())); if (strConent.equalsIgnoreCase(lastStr)){ }else{ @@ -549,9 +551,7 @@ } private void sendVechileInfo() { new Thread(new Runnable() { @Override public void run() { String carPath = ExamPlatformData.getInstance().getCarModelPath(); if (!TextUtils.isEmpty(carPath)){ MyLog.i("使用更新后的Car模型地图"+carPath); @@ -575,14 +575,11 @@ }); } } }).start(); } private void sendMapInfo(){ new Thread(new Runnable() { @Override public void run() { final String mapPath = ExamPlatformData.getInstance().getMapPath(); final String roadmapPath = ExamPlatformData.getInstance().getRoadMapPath(); @@ -638,8 +635,7 @@ }); } } }).start(); } app/src/main/java/safeluck/drive/evaluation/util/DataInit.kt
@@ -62,7 +62,7 @@ fun sendExamLights(applicationContext: Context){ MyLog.i("发送灯光") val examType = WorkRoomDataBase.getWorkRoomDataBase(applicationContext).examStatusDao.startExamInt; val examType = ExamPlatformData.getInstance().examType simulateNightBean.setExam(0) val list = ExamPlatformData.getInstance().simulate_light_tips app/src/main/java/safeluck/drive/evaluation/util/Utils.java
@@ -560,6 +560,11 @@ return simpleDateFormat.format(begin_time); } public static String formatTimeYYMMDDHHmmSSSSS(long begin_time) { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); return simpleDateFormat.format(begin_time); } public static boolean isDigital(String str){ String regx = "^[0-9]*$";