diff --git a/OCH/sweeper/sweeper-cloud/schemas/com.mogo.och.sweepercloud.database.MyDataBase/1.json b/OCH/sweeper/sweeper-cloud/schemas/com.mogo.och.sweepercloud.database.MyDataBase/1.json new file mode 100644 index 0000000000..b3961faec0 --- /dev/null +++ b/OCH/sweeper/sweeper-cloud/schemas/com.mogo.och.sweepercloud.database.MyDataBase/1.json @@ -0,0 +1,86 @@ +{ + "formatVersion": 1, + "database": { + "version": 1, + "identityHash": "48873cc5d9f967e9df0245dc045cf91a", + "entities": [ + { + "tableName": "welt_data_table", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `subTaskId` TEXT, `locLon` REAL NOT NULL, `locLat` REAL NOT NULL, `weltDistance` REAL NOT NULL, `cleanMode` INTEGER NOT NULL, `cleanDirection` INTEGER NOT NULL, `cleanIntensity` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "subTaskId", + "columnName": "subTaskId", + "affinity": "TEXT", + "notNull": false + }, + { + "fieldPath": "locLon", + "columnName": "locLon", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "locLat", + "columnName": "locLat", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "weltDistance", + "columnName": "weltDistance", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "cleanMode", + "columnName": "cleanMode", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "cleanDirection", + "columnName": "cleanDirection", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "cleanIntensity", + "columnName": "cleanIntensity", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_welt_data_table_id", + "unique": true, + "columnNames": [ + "id" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_welt_data_table_id` ON `${TABLE_NAME}` (`id`)" + } + ], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '48873cc5d9f967e9df0245dc045cf91a')" + ] + } +} \ No newline at end of file diff --git a/OCH/sweeper/sweeper/schemas/com.mogo.och.sweeper.database.MyDataBase/1.json b/OCH/sweeper/sweeper/schemas/com.mogo.och.sweeper.database.MyDataBase/1.json new file mode 100644 index 0000000000..a9451322a4 --- /dev/null +++ b/OCH/sweeper/sweeper/schemas/com.mogo.och.sweeper.database.MyDataBase/1.json @@ -0,0 +1,86 @@ +{ + "formatVersion": 1, + "database": { + "version": 1, + "identityHash": "0897ef4b7b6a43fccf8bcf4b2144dafa", + "entities": [ + { + "tableName": "welt_data_table", + "createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `subTaskId` INTEGER NOT NULL, `locLon` REAL NOT NULL, `locLat` REAL NOT NULL, `weltDistance` REAL NOT NULL, `cleanMode` INTEGER NOT NULL, `cleanDirection` INTEGER NOT NULL, `cleanIntensity` INTEGER NOT NULL)", + "fields": [ + { + "fieldPath": "id", + "columnName": "id", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "subTaskId", + "columnName": "subTaskId", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "locLon", + "columnName": "locLon", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "locLat", + "columnName": "locLat", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "weltDistance", + "columnName": "weltDistance", + "affinity": "REAL", + "notNull": true + }, + { + "fieldPath": "cleanMode", + "columnName": "cleanMode", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "cleanDirection", + "columnName": "cleanDirection", + "affinity": "INTEGER", + "notNull": true + }, + { + "fieldPath": "cleanIntensity", + "columnName": "cleanIntensity", + "affinity": "INTEGER", + "notNull": true + } + ], + "primaryKey": { + "columnNames": [ + "id" + ], + "autoGenerate": true + }, + "indices": [ + { + "name": "index_welt_data_table_id", + "unique": true, + "columnNames": [ + "id" + ], + "orders": [], + "createSql": "CREATE UNIQUE INDEX IF NOT EXISTS `index_welt_data_table_id` ON `${TABLE_NAME}` (`id`)" + } + ], + "foreignKeys": [] + } + ], + "views": [], + "setupQueries": [ + "CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)", + "INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '0897ef4b7b6a43fccf8bcf4b2144dafa')" + ] + } +} \ No newline at end of file diff --git a/app/bugly/BuglySymtabLog.txt b/app/bugly/BuglySymtabLog.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/app/bugly/BuglyUploadLog.txt b/app/bugly/BuglyUploadLog.txt deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/app/build.gradle b/app/build.gradle index 1f2aa6557d..61aaeb3c77 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -125,22 +125,26 @@ android { mogo { dimension "project" + buildConfigField 'boolean', 'secure', "true" buildConfigField 'String', 'URLs', "\"${readFileToJson("mogo").replace("\"", "\\\"")}\"" buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("mogo").replace("\"", "\\\"")}\"" } yantai { dimension "project" + buildConfigField 'boolean', 'secure', "false" buildConfigField 'String', 'URLs', "\"${readFileToJson("yantai").replace("\"", "\\\"")}\"" buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("yantai").replace("\"", "\\\"")}\"" } dali { dimension "project" + buildConfigField 'boolean', 'secure', "false" buildConfigField 'String', 'URLs', "\"${readFileToJson("dali").replace("\"", "\\\"")}\"" buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("dali").replace("\"", "\\\"")}\"" } saas { dimension "project" + buildConfigField 'boolean', 'secure', "false" buildConfigField 'String', 'URLs', "\"${readFileToJson("saas").replace("\"", "\\\"")}\"" buildConfigField 'String', 'tempConfig', "\"${readFileToJsonTemp("saas").replace("\"", "\\\"")}\"" } diff --git a/app/config/urlConfig.json b/app/config/urlConfig.json index e5c9512703..b0d35fa87d 100644 --- a/app/config/urlConfig.json +++ b/app/config/urlConfig.json @@ -10,7 +10,10 @@ "eagle_mis_url": "", "eagle_dns_url": "", "bind_driver_qr_url": "", - "chart_socket_url":"" + "chart_socket_url":"", + "secure_active_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/active", + "secure_refresh_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/refresh", + "secure_auth_url":"http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/auth" }, "online": { "och_url": "https://tech.zhidaohulian.com", @@ -22,7 +25,10 @@ "eagle_mis_url": "", "eagle_dns_url": "", "bind_driver_qr_url": "", - "chart_socket_url":"" + "chart_socket_url":"", + "secure_active_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/active", + "secure_refresh_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/refresh", + "secure_auth_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/auth" }, "demo": { "och_url": "http://tech-dev.zhidaohulian.com", @@ -34,7 +40,10 @@ "eagle_mis_url": "", "eagle_dns_url": "", "bind_driver_qr_url": "", - "chart_socket_url":"" + "chart_socket_url":"", + "secure_active_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/active", + "secure_refresh_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/refresh", + "secure_auth_url":"https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/auth" } }, "dali": { diff --git a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt index ff00cbeb78..0287f776f9 100644 --- a/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt +++ b/app/src/main/java/com/mogo/launcher/startup/ConfigStartUp.kt @@ -68,6 +68,8 @@ object ConfigStartUp { // } // 不同身份对应不同的IP地址 FunctionBuildConfig.adasConnectIP = BuildConfig.ADAS_CONNECT_IP + // 是否开启secure校验 + FunctionBuildConfig.isSecure = BuildConfig.secure } private fun initDebugConfig() { diff --git a/config.gradle b/config.gradle index f1ab548012..79dfcf477f 100644 --- a/config.gradle +++ b/config.gradle @@ -223,7 +223,7 @@ ext { log_runtime : "com.mogo.eagle.core.log.record:runtime:1.0.6", // 安全证书 - passport_secret : "com.zhidaoauto:sdk-java:1.0.4-SNAPSHOT" + passport_secret : "com.zhidaoauto:sdk-java:1.0.5-SNAPSHOT" ] android = [ launcherApplicationId : "com.mogo.launcher", diff --git a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt index 50eb5490b2..7bb917b61c 100644 --- a/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt +++ b/core/function-impl/mogo-core-function-biz/src/main/java/com/mogo/eagle/function/biz/v2x/trafficlight/core/MogoTrafficLightManager.kt @@ -34,6 +34,7 @@ class MogoTrafficLightManager : IMoGoChassisLocationGCJ02Listener { private var mContext: Context? = null private val trafficLightNetWorkModel = TrafficLightNetWorkModel() + @Volatile private var mLocation: MogoLocation? = null private var roadIDResult: RoadIDResult? = null private var trafficLightResult: TrafficLightResult? = null diff --git a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/location/MoGoLocationDispatcher.kt b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/location/MoGoLocationDispatcher.kt index 31160ae060..4e8309243d 100644 --- a/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/location/MoGoLocationDispatcher.kt +++ b/core/function-impl/mogo-core-function-datacenter/src/main/java/com/mogo/eagle/core/function/datacenter/location/MoGoLocationDispatcher.kt @@ -41,6 +41,7 @@ object MoGoLocationDispatcher : /** * 最后一次高德定位返回的位置信息 */ + @Volatile private var lastGaoDeLocation: MogoLocation = MogoLocation() fun initListener() { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt index d6701babf6..d1eab927b4 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/DebugSettingView.kt @@ -1573,6 +1573,13 @@ internal class DebugSettingView @JvmOverloads constructor( tvGitBranchInfo.text = "Git分支:${AppConfigInfo.workingBranchName}" tvAppBuildTimeInfo.text = "版本构建时间:${AppConfigInfo.appBuildTime}" + if(tbBeautyMode.isVisible){ + val version = ParseVersionUtils.parseVersion(true, CallerAutoPilotStatusListenerManager.getDockerVersion()) + if(version >= 30100 && AppIdentityModeUtils.isTaxi(FunctionBuildConfig.appIdentityMode)){ + tbBeautyMode.visibility = View.GONE + } + } + /** * 状态中心 */ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt index 729f16b572..0eb27acdf8 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/setting/SOPSettingView.kt @@ -101,6 +101,16 @@ internal class SOPSettingView @JvmOverloads constructor( FunctionBuildConfig.isV2NPnc = isChecked } + tbV2iPnc.isChecked = FunctionBuildConfig.isV2IPnc + tbV2iPnc.setOnCheckedChangeListener{ compoundButton, isChecked -> + if(!compoundButton.isPressed){ + return@setOnCheckedChangeListener + } + hmiAction("SOP V2I场景进PNC, ",isChecked) + CallerAutoPilotControlManager.sendV2iToPncCmd(isChecked) + FunctionBuildConfig.isV2IPnc = isChecked + } + /** * 默认打开 */ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt index 65e08ba9b9..af79a7a9aa 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/tools/AutoPilotAndCheckView.kt @@ -12,6 +12,7 @@ import android.view.View import android.widget.FrameLayout import com.mogo.eagle.core.data.app.AppConfigInfo import com.mogo.eagle.core.data.deva.bindingcar.IPCUpgradeStateInfo +import com.mogo.eagle.core.data.deva.bizconfig.FuncBizConfig import com.mogo.eagle.core.data.temp.EventLogout import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotCarConfigListener import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotControlManager @@ -24,6 +25,7 @@ import com.mogo.eagle.core.function.msgbox.MsgBoxConfig import com.mogo.eagle.core.utilcode.kotlin.onClick import com.mogo.eagle.core.utilcode.util.ToastUtils import com.mogo.eagle.core.utilcode.util.UiThreadHandler +import com.zhjt.service_biz.BizConfig import kotlinx.android.synthetic.main.view_auto_pilot_check.view.* import mogo.telematics.pad.MessagePad import org.greenrobot.eventbus.EventBus @@ -149,9 +151,17 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor( if (AppConfigInfo.isConnectAutopilot) { CallerAutoPilotControlManager.getCarConfig() } -// if (maxAcceleration > 0) { + + initSpeedSetView() + initOchView() + } + + @BizConfig(FuncBizConfig.FOUNDATION, "", FuncBizConfig.BIZ_LIMIT_SPEED_SET) + private fun initSpeedSetView(){ + // if (maxAcceleration > 0) { // tvAcceleration.text = "加速度 $maxAcceleration m/s²" // } + clSpeedSet.visibility = View.VISIBLE tvAcceleration.text = "每次调整车速±5km/h,点击确定生效" if (speedLimit > 0) { etInputSpeed.setText(speedLimit.toString()) @@ -237,8 +247,6 @@ internal class AutoPilotAndCheckView @JvmOverloads constructor( etInputSpeed.setSelection(speedLimit.toString().length) }catch (_:Exception){} } - - initOchView() } private fun initOchView() { diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaBusView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaBusView.kt index db0ec82a18..21077b9aaf 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaBusView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaBusView.kt @@ -57,7 +57,7 @@ class RomaBusView @JvmOverloads constructor( } setOnClickListener { - if (ClickUtils.isClickTooFrequent(this,1200)) { + if (ClickUtils.isClickTooFrequent(this,1000)) { return@setOnClickListener } if(!click){ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaPassengerView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaPassengerView.kt index 1517ae014b..a613c48a60 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaPassengerView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaPassengerView.kt @@ -42,7 +42,7 @@ class RomaPassengerView @JvmOverloads constructor( normalRes = a.getResourceId(R.styleable.RomaPassengerView_roma_close, 0) a.recycle() setOnClickListener { - if (ClickUtils.isClickTooFrequent(this,1200)) { + if (ClickUtils.isClickTooFrequent(this,1000)) { return@setOnClickListener } if(!click){ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaTaxiView.kt b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaTaxiView.kt index e6040d4a8c..1dae638eca 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaTaxiView.kt +++ b/core/function-impl/mogo-core-function-hmi/src/main/java/com/mogo/eagle/core/function/hmi/ui/widget/RomaTaxiView.kt @@ -55,7 +55,7 @@ class RomaTaxiView @JvmOverloads constructor( } setOnClickListener { - if (ClickUtils.isClickTooFrequent(this,1200)) { + if (ClickUtils.isClickTooFrequent(this,1000)) { return@setOnClickListener } if(!click){ diff --git a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml index 00d935bb03..3995b40c50 100644 --- a/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml +++ b/core/function-impl/mogo-core-function-hmi/src/main/res/layout/view_auto_pilot_check.xml @@ -128,8 +128,8 @@ android:layout_width="wrap_content" android:layout_height="@dimen/dp_216" android:layout_marginTop="@dimen/dp_90" - app:layout_constraintTop_toBottomOf="@id/checkLayout" - app:layout_constraintLeft_toLeftOf="@id/checkLayout"> + app:layout_constraintLeft_toLeftOf="@id/checkLayout" + app:layout_constraintTop_toBottomOf="@id/checkLayout"> + android:text="@string/debug_sop" + android:textColor="@color/color_FFA7B6F0" + android:textSize="32dp" /> @@ -153,28 +152,25 @@ android:id="@+id/managerLayout" android:layout_width="wrap_content" android:layout_height="@dimen/dp_216" - app:layout_constraintTop_toTopOf="@id/sopLayout" + android:layout_marginStart="142dp" app:layout_constraintBottom_toBottomOf="@id/sopLayout" app:layout_constraintLeft_toRightOf="@id/sopLayout" - android:layout_marginStart="142dp" - > + app:layout_constraintTop_toTopOf="@id/sopLayout"> + android:background="@drawable/debug_icon_bag_manager" /> + android:text="@string/debug_bad_case_manager" + android:textColor="@color/color_FFA7B6F0" + android:textSize="32dp" /> @@ -182,28 +178,25 @@ android:id="@+id/badCaseLayout" android:layout_width="wrap_content" android:layout_height="@dimen/dp_216" - app:layout_constraintTop_toTopOf="@id/managerLayout" + android:layout_marginStart="142dp" app:layout_constraintBottom_toBottomOf="@id/managerLayout" app:layout_constraintLeft_toRightOf="@id/managerLayout" - android:layout_marginStart="142dp" - > + app:layout_constraintTop_toTopOf="@id/managerLayout"> + android:background="@drawable/debug_icon_bad_case" /> + android:text="@string/debug_bad_case_report" + android:textColor="@color/color_FFA7B6F0" + android:textSize="32dp" /> @@ -220,101 +213,108 @@ app:layout_constraintStart_toEndOf="@+id/v_second_group" app:layout_constraintTop_toTopOf="@+id/v_second_group" /> - - - - - - - - - - - - - - - + app:layout_constraintTop_toBottomOf="@id/sopLayout"> + + + + + + + + + + + + + + + + + + + app:layout_constraintTop_toBottomOf="@id/clSpeedSet" /> + app:layout_constraintTop_toBottomOf="@id/clSpeedSet" /> - + - + + + @@ -259,6 +256,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, ) showAiCloud.set(true) FunctionBuildConfig.isDrawIdentifyData = false + CallerMapRomaListener.invokeMapRoma(true) // 5秒没有触发 则预警日志写入 handler.sendEmptyMessageDelayed(H_ERROR_CLOUD, H_DELAY_TIME) } @@ -267,6 +265,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, m.what = H_ERROR_MAP m.obj = msg handler.sendMessage(m) + CallerMapRomaListener.invokeMapRoma(false) closeRoma(false) } 2 -> { // 地图自动漫游结束,重置状态,调用close通知服务端 @@ -298,6 +297,7 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener, aiCloudDataChange.set(false) MapIdentifySubscriber.instance.clearAiCloudRoma() FunctionBuildConfig.isDrawIdentifyData = true + CallerMapRomaListener.invokeMapRoma(false) if (invokeCloud) { closeRoma(false) } diff --git a/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt b/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt index 878b316c4f..72487ef651 100644 --- a/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt +++ b/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/HttpDnsStartUp.kt @@ -124,7 +124,7 @@ class HttpDnsStartUp : AndroidStartup() { // 使用中台长链接 clientConfig.isUseOriginSocket = true // 设置是否输出网络日志 - clientConfig.isShowNetDebugLog = false + clientConfig.isShowNetDebugLog = true //todo test clientConfig.passportUrl = FunctionBuildConfig.urlJson.passportUrl clientConfig.socketBaseUrl = FunctionBuildConfig.urlJson.socketBaseUrl @@ -250,52 +250,55 @@ class HttpDnsStartUp : AndroidStartup() { mStartParams["app_identity_mode"] = FunctionBuildConfig.appIdentityMode MogoAnalyticUtils.track("app_start_time", mStartParams) - context?.let { - val authStatus = SharedPrefsMgr.getInstance(it).getBoolean("passportAuth", false) - if (authStatus) { - // clientConfig设置auth值,并带入header - clientConfig.authPubKey = SharedPrefsMgr.getInstance(it) - .getString("passportAuthKey", "") - return@let - } - // 安全校验 - try { - PassPortSecret.getInstance().init(sn, it.filesDir.path, object : - IPassportSecret { + if (FunctionBuildConfig.isSecure) { + context?.let { + val authStatus = + SharedPrefsMgr.getInstance(it).getBoolean("passportAuth-${DebugConfig.getNetMode()}", false) + if (authStatus) { + // clientConfig设置auth值,并带入header + clientConfig.authPubKey = SharedPrefsMgr.getInstance(it) + .getString("passportAuthKey-${DebugConfig.getNetMode()}", "") + return@let + } + // 安全校验 + try { + PassPortSecret.getInstance().init(sn, it.filesDir.path, object : + IPassportSecret { - @ChainLog( - linkChainLog = CHAIN_TYPE_INIT_STATUS, - linkCode = CHAIN_SOURCE_CLOUD, - nodeAliasCode = CHAIN_CODE_CLOUD_PASSPORT_AUTH_OK, - paramIndexes = [0] - ) - override fun onSuccess(secretKey: String) { - CallerLogger.d( - "$M_MAIN$TAG", - "onSuccess secretKey:$secretKey , thread:${Thread.currentThread().name}" + @ChainLog( + linkChainLog = CHAIN_TYPE_INIT_STATUS, + linkCode = CHAIN_SOURCE_CLOUD, + nodeAliasCode = CHAIN_CODE_CLOUD_PASSPORT_AUTH_OK, + paramIndexes = [0] ) - clientConfig.authPubKey = secretKey - SharedPrefsMgr.getInstance(it).putString("passportAuthKey", secretKey) - SharedPrefsMgr.getInstance(it).putBoolean("passportAuth", true) - } - - @ChainLog( - linkChainLog = CHAIN_TYPE_INIT_STATUS, - linkCode = CHAIN_SOURCE_CLOUD, - nodeAliasCode = CHAIN_CODE_CLOUD_PASSPORT_AUTH_FAILED, - paramIndexes = [0, 1] - ) - override fun onFailed(errorCode: Int, errorMsg: String) { - logError( - getPrReason( - "PassPortSecret-onFailed , errorCode:$errorCode" + - ",errorMsg:$errorMsg + override fun onSuccess(secretKey: String) { + CallerLogger.d( + "$M_MAIN$TAG", + "onSuccess secretKey:$secretKey , thread:${Thread.currentThread().name}" ) + clientConfig.authPubKey = secretKey + SharedPrefsMgr.getInstance(it) + .putString("passportAuthKey-${DebugConfig.getNetMode()}", secretKey) + SharedPrefsMgr.getInstance(it).putBoolean("passportAuth-${DebugConfig.getNetMode()}", true) + } + + @ChainLog( + linkChainLog = CHAIN_TYPE_INIT_STATUS, + linkCode = CHAIN_SOURCE_CLOUD, + nodeAliasCode = CHAIN_CODE_CLOUD_PASSPORT_AUTH_FAILED, + paramIndexes = [0, 1] ) - } - }) - } catch (e: Exception) { - e.printStackTrace() + override fun onFailed(errorCode: Int, errorMsg: String) { + logError( + getPrReason( + "PassPortSecret-onFailed , errorCode:$errorCode,errorMsg:$errorMsg" + ) + ) + } + }) + } catch (e: Exception) { + e.printStackTrace() + } } } diff --git a/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/secret/PassPortSecret.java b/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/secret/PassPortSecret.java index 658d3cde33..a1e17d349a 100644 --- a/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/secret/PassPortSecret.java +++ b/core/function-impl/mogo-core-function-startup/src/main/java/com/mogo/eagle/core/function/startup/stageone/secret/PassPortSecret.java @@ -1,11 +1,27 @@ package com.mogo.eagle.core.function.startup.stageone.secret; +import android.util.Base64; + +import com.mogo.commons.debug.DebugConfig; +import com.mogo.eagle.core.data.app.UrlConfig; +import com.mogo.eagle.core.data.config.FunctionBuildConfig; +import com.mogo.eagle.core.utilcode.util.GsonUtils; +import com.mogo.eagle.core.utilcode.util.Utils; +import com.zhidao.utils.digest.Base64Utils; + +import java.io.UnsupportedEncodingException; + import constant.ErrorCode; import domain.Passport; import service.PassportService; public class PassPortSecret { +// # 云端正式环境 +// # passport_active=https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/active +// # passport_refresh=https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/refresh +// # passport_auth=https://mygateway.zhidaozhixing.com/openapi/security/deviceCert/auth + private PassPortSecret() { } @@ -33,16 +49,23 @@ public class PassPortSecret { domain.R res = passportService.deviceActive(passport); if (res.getCode() != ErrorCode.OK.getCode()) { secretCB.onFailed(res.getCode(), res.getMsg()); + }else{ + String secretKey = res.getData(); + try { + String result = new String(Base64.encode(secretKey.getBytes("utf-8"), Base64.NO_WRAP),"utf-8"); + secretCB.onSuccess(result); + } catch (UnsupportedEncodingException e) { + secretCB.onFailed(5000,"url encode error :" + secretKey); + } + } - String secretKey = res.getData(); - secretCB.onSuccess(secretKey); } private static domain.R initLow(PassportService passportService, String deviceId, String path) { return passportService.init(Passport.builder().type(1) - .deviceActive("http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/active") - .deviceRefresh("http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/refresh") - .deviceAuth("http://gateway.ee-private-dev1.myghost.zhidaoauto.com/openapi/security/deviceCert/auth") + .deviceActive(FunctionBuildConfig.urlJson.getSecureActive()) + .deviceRefresh(FunctionBuildConfig.urlJson.getSecureRefresh()) + .deviceAuth(FunctionBuildConfig.urlJson.getSecureAuth()) .productId("10019") .productSecret("5cbcdc2240fa4104a70f28cdbe5ca69b") .sn(deviceId) diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/UrlConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/UrlConfig.kt index 2a4614ab12..5ba45b9c79 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/UrlConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/app/UrlConfig.kt @@ -22,5 +22,11 @@ data class UrlConfig( @SerializedName("bind_driver_qr_url") val bindDriverQRUrl: String, @SerializedName("chart_socket_url") - val chartSocketUrl: String + val chartSocketUrl: String, + @SerializedName("secure_active_url") + val secureActive: String, + @SerializedName("secure_refresh_url") + val secureRefresh: String, + @SerializedName("secure_auth_url") + val secureAuth: String ) \ No newline at end of file diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt index b9d3ebd796..c5fdd6d0f7 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/config/FunctionBuildConfig.kt @@ -239,10 +239,21 @@ object FunctionBuildConfig { @JvmField var isV2NPnc = false + /** + * 是否开启V2I场景进PNC的开关,开关默认关闭 + */ + @Volatile + @JvmField + var isV2IPnc = false + @Volatile @JvmField var isPassStartAutopilotCommand = true + @Volatile + @JvmField + var isSecure = false + /** *平行驾驶过程中检测到弱网停车策略,默认打开,演示时手动关闭 */ diff --git a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/bizconfig/FuncBizConfig.kt b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/bizconfig/FuncBizConfig.kt index 1c714dcc59..d1eb8e72b5 100644 --- a/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/bizconfig/FuncBizConfig.kt +++ b/core/mogo-core-data/src/main/java/com/mogo/eagle/core/data/deva/bizconfig/FuncBizConfig.kt @@ -37,7 +37,7 @@ class FuncBizConfig { const val BIZ_TRACE_LOG = "BIZ_TRACE_LOG" // 链路日志 todo 暂未有场景,未实现 const val BIZ_BAG_RECORD = "BIZ_BAG_RECORD" // Bag录制 const val BIZ_WARNING_UPLOAD = "BIZ_WARNING_UPLOAD" // 异常上报 - const val BIZ_LIMIT_SPEED_SET = "BIZ_LIMIT_SPEED_SET" // 限速设置 todo 暂未有场景,未实现 + const val BIZ_LIMIT_SPEED_SET = "BIZ_LIMIT_SPEED_SET" // 限速设置 const val BIZ_BYPASS = "BIZ_BYPASS" // 绕障 todo 暂未实现 const val BIZ_AUTOPILOT_LANE_SELECTION = "BIZ_AUTOPILOT_LANE_SELECTION" // 择机变道 todo 暂未实现 const val BIZ_PNC_ACTIONS = "BIZ_PNC_ACTIONS" // PNC行为决策 diff --git a/gradle.properties b/gradle.properties index bfbc7548a8..9451a35bd4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -66,23 +66,23 @@ SERVICE_BIZ_VERSION=1.2.4 LOGLIB_VERSION=1.7.0 ######## MogoAiCloudSDK Version ######## # 网络请求LOGLIB_VERSION -MOGO_NETWORK_VERSION=1.4.7.10 +MOGO_NETWORK_VERSION=1.4.7.11 # 鉴权 -MOGO_PASSPORT_VERSION=1.4.7.10 +MOGO_PASSPORT_VERSION=1.4.7.11 # 常链接 -MOGO_SOCKET_VERSION=1.4.7.10 +MOGO_SOCKET_VERSION=1.4.7.11 # 数据采集 -MOGO_REALTIME_VERSION=1.4.7.10 +MOGO_REALTIME_VERSION=1.4.7.11 # 探路,道路事件发布,获取 -MOGO_TANLU_VERSION=1.4.7.10 +MOGO_TANLU_VERSION=1.4.7.11 # 直播推流 -MOGO_LIVE_VERSION=1.4.7.10 +MOGO_LIVE_VERSION=1.4.7.11 # 直播拉流 -MOGO_TRAFFICLIVE_VERSION=1.4.7.10 +MOGO_TRAFFICLIVE_VERSION=1.4.7.11 # 定位服务 -MOGO_LOCATION_VERSION=1.4.7.10 +MOGO_LOCATION_VERSION=1.4.7.11 # 远程通讯模块 -MOGO_TELEMATIC_VERSION=1.4.7.10 +MOGO_TELEMATIC_VERSION=1.4.7.11 ######## MogoAiCloudSDK Version ######## # 自研地图 MAP_SDK_VERSION=2.14.1.2