加入车辆模型、场地地图、道路地图是否发送成功的判断;收到移动站服务给的考试状态错误码后,发送完所需的地图/车辆后,继续发送考试状态
1个文件已修改
26 ■■■■■ 已修改文件
app/src/main/java/safeluck/drive/evaluation/app.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/safeluck/drive/evaluation/app.java
@@ -115,6 +115,25 @@
    }
    private void sendExamJson(int type) {
        try {
            MyLog.i("收到错误码之后,发送考试状态,examType="+type);
            JSONObject jsonObject = new JSONObject();
            if (type != Constant.NONE_BEEN_START_EXAM){
            jsonObject.put("exam", 1);
            }else{
            jsonObject.put("exam", 0);
            }
            jsonObject.put("type", type);
            String examJson = jsonObject.toString();
            Log.i(TAG, "onClick: " + examJson);
            AYSdk.getInstance().sendCmd(Constant.EXAM_STATUS, examJson);
        } catch (JSONException e) {
            e.printStackTrace();
        }
    }
    private void initData() {
        CThreadPoolExecutor.runInBackground(()->{
@@ -392,18 +411,21 @@
                            DataInitKt.sendMapInfo();
                            DataInitKt.sendRoadMapInfo();
                            sendExamJson(ExamPlatformData.getInstance().getExamType());
                            break;
                        case -2:
                            DataInitKt.sendVehicleInfo();
                            sendExamJson(ExamPlatformData.getInstance().getExamType());
                            break;
                        case -3:
                            sendRouteExam();
                            sendJudgeArgs();
                            Data data = new Data.Builder().putInt(Constant.NEED_MAPS_CAR,1).build();
                            OneTimeWorkRequest examStatausOutWorker1 = new OneTimeWorkRequest.Builder(ExamStatusOutWorker.class)
                                    .setInputData(data).build();
                            WorkManager.getInstance(getApplicationContext()).enqueue(examStatausOutWorker1);
                            sendRouteExam();
                            sendJudgeArgs();
                            break;
                    }
                } catch (JSONException e) {