fctom1215
2020-08-26 173132d3eccbf8cc457a328c099b2cbde8cbc649
app/src/main/java/safeluck/drive/evaluation/DB/rtktb/RTKConfigUpdateWorker.kt
@@ -96,6 +96,7 @@
                override fun onResponse(call: Call<ResponseBody>, response: Response<ResponseBody>) {
                    var str: String = response.body()!!.string()
                    MyLog.i(PlatFormConstant.HTTPTAG,str)
                    jsonObject1 = JSONObject(str)
                    val result = jsonObject1!!.getBoolean("result")
                    if (result) {
@@ -103,6 +104,7 @@
                        when(type){
                            "road" ->{
                                mapInfoHead.type = BaseDataUIBean.TYPE_.road
                                val map = gson.fromJson<HttpRoadMapRsp>(str, HttpRoadMapRsp::class.java)
                            if (map.isResult) {
@@ -116,10 +118,10 @@
                                        ExamPlatformData.getInstance().setNewRoadMapPath(Environment.getExternalStorageDirectory().absolutePath + "/"
                                                + applicationContext.getPackageName() + "/" + fileName)
                                        CThreadPoolExecutor.runInBackground(Runnable {
                                            str = gson.toJson(map.data.map_json)
                                            str = gson.toJson(map.data.map_json.map_json)
                                            MyLog.i(PlatFormConstant.HTTPTAG,"科三道路地图保存成功")
                                            FileUtil.writeTxtFileToSD(applicationContext, fileName, str, "")
//                                            sendRoadMapInfo()
                                            sendRoadMapInfo()
                                        })
                                    }