[3.4.0] add auth key sdk in httpdnsStartUp, funbiz add limit in speed limit ,plus fix bugs
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -41,6 +41,7 @@ object MoGoLocationDispatcher :
|
||||
/**
|
||||
* 最后一次高德定位返回的位置信息
|
||||
*/
|
||||
@Volatile
|
||||
private var lastGaoDeLocation: MogoLocation = MogoLocation()
|
||||
|
||||
fun initListener() {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 状态中心
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认打开
|
||||
*/
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -57,7 +57,7 @@ class RomaBusView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
setOnClickListener {
|
||||
if (ClickUtils.isClickTooFrequent(this,1200)) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(!click){
|
||||
|
||||
@@ -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){
|
||||
|
||||
@@ -55,7 +55,7 @@ class RomaTaxiView @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
setOnClickListener {
|
||||
if (ClickUtils.isClickTooFrequent(this,1200)) {
|
||||
if (ClickUtils.isClickTooFrequent(this,1000)) {
|
||||
return@setOnClickListener
|
||||
}
|
||||
if(!click){
|
||||
|
||||
@@ -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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150dp"
|
||||
@@ -140,12 +140,11 @@
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:text="@string/debug_sop"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
android:text="@string/debug_sop"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/debug_icon_bag_manager"
|
||||
/>
|
||||
android:background="@drawable/debug_icon_bag_manager" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:text="@string/debug_bad_case_manager"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
android:text="@string/debug_bad_case_manager"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -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">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="150dp"
|
||||
android:layout_height="150dp"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:background="@drawable/debug_icon_bad_case"
|
||||
/>
|
||||
android:background="@drawable/debug_icon_bad_case" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="42dp"
|
||||
android:text="@string/debug_bad_case_report"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32dp"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_centerHorizontal="true"
|
||||
/>
|
||||
android:text="@string/debug_bad_case_report"
|
||||
android:textColor="@color/color_FFA7B6F0"
|
||||
android:textSize="32dp" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -220,101 +213,108 @@
|
||||
app:layout_constraintStart_toEndOf="@+id/v_second_group"
|
||||
app:layout_constraintTop_toTopOf="@+id/v_second_group" />
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="94dp"
|
||||
android:background="@color/color_FF2966EC"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/sopLayout" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginStart="113dp"
|
||||
android:layout_marginTop="76dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/check_vehicle_speed_setting"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/sopLayout" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedReduce"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="140dp"
|
||||
android:layout_marginStart="113dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:src="@drawable/icon_speed_reduce"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSpeedTitle"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etInputSpeed"
|
||||
android:layout_width="189dp"
|
||||
android:layout_height="140dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedReduce"
|
||||
android:background="#1E3062"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="80dp"
|
||||
android:gravity="center"
|
||||
tools:ignore="SpeakableTextPresentCheck"
|
||||
android:focusableInTouchMode="false"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedAdd"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="140dp"
|
||||
app:layout_constraintTop_toTopOf="@id/etInputSpeed"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etInputSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/etInputSpeed"
|
||||
android:src="@drawable/icon_speed_add"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUnit"
|
||||
android:layout_width="wrap_content"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/clSpeedSet"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km/h"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedAdd"
|
||||
android:layout_marginStart="40dp" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvSureModify"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="135dp"
|
||||
android:background="@drawable/taxi_loginout_sure_bg"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42dp"
|
||||
android:layout_marginLeft="50dp"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvUnit"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAcceleration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="123dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textColor="#A7B6F0"
|
||||
android:textSize="32dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivSpeedReduce" />
|
||||
app:layout_constraintTop_toBottomOf="@id/sopLayout">
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginStart="80dp"
|
||||
android:layout_marginTop="94dp"
|
||||
android:background="@color/color_FF2966EC"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSpeedTitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="86dp"
|
||||
android:layout_marginStart="113dp"
|
||||
android:layout_marginTop="76dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/check_vehicle_speed_setting"
|
||||
android:textColor="@color/color_FFFFFF"
|
||||
android:textSize="42dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedReduce"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="140dp"
|
||||
android:layout_marginStart="113dp"
|
||||
android:layout_marginTop="40dp"
|
||||
android:src="@drawable/icon_speed_reduce"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvSpeedTitle" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatEditText
|
||||
android:id="@+id/etInputSpeed"
|
||||
android:layout_width="189dp"
|
||||
android:layout_height="140dp"
|
||||
android:background="#1E3062"
|
||||
android:focusableInTouchMode="false"
|
||||
android:gravity="center"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="80dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedReduce"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedReduce"
|
||||
tools:ignore="SpeakableTextPresentCheck" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivSpeedAdd"
|
||||
android:layout_width="105dp"
|
||||
android:layout_height="140dp"
|
||||
android:src="@drawable/icon_speed_add"
|
||||
app:layout_constraintBottom_toBottomOf="@id/etInputSpeed"
|
||||
app:layout_constraintLeft_toRightOf="@id/etInputSpeed"
|
||||
app:layout_constraintTop_toTopOf="@id/etInputSpeed" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvUnit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="40dp"
|
||||
android:text="km/h"
|
||||
android:textColor="#FFFFFFFF"
|
||||
android:textSize="38dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
android:id="@+id/tvSureModify"
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="135dp"
|
||||
android:layout_marginLeft="50dp"
|
||||
android:background="@drawable/taxi_loginout_sure_bg"
|
||||
android:gravity="center"
|
||||
android:text="确定"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="42dp"
|
||||
app:layout_constraintBottom_toBottomOf="@id/ivSpeedAdd"
|
||||
app:layout_constraintLeft_toRightOf="@id/tvUnit"
|
||||
app:layout_constraintTop_toTopOf="@id/ivSpeedAdd"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvAcceleration"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="123dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:textColor="#A7B6F0"
|
||||
android:textSize="32dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/ivSpeedReduce" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="14dp"
|
||||
@@ -324,7 +324,7 @@
|
||||
android:background="@color/color_FF2966EC"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAcceleration" />
|
||||
app:layout_constraintTop_toBottomOf="@id/clSpeedSet" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSystemOperation"
|
||||
@@ -338,7 +338,7 @@
|
||||
android:textSize="42dp"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tvAcceleration" />
|
||||
app:layout_constraintTop_toBottomOf="@id/clSpeedSet" />
|
||||
|
||||
<com.mogo.eagle.core.function.hmi.ui.widget.CheckSystemView
|
||||
android:id="@+id/checkSystemView"
|
||||
|
||||
@@ -251,32 +251,46 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/tbGreenWaveSop"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbNewV2NData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="V2N新链路"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
|
||||
/>
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbV2iPnc"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="V2I场景进PNC"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintLeft_toRightOf="@id/verticalGuideLine"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbV2nPnc"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbNew360LookAround"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="360环视"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
|
||||
app:layout_constraintLeft_toRightOf="@+id/verticalGuideLine"
|
||||
app:layout_constraintRight_toRightOf="parent" />
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbNewV2NData"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="V2N新链路"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbIPCReport"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toLeftOf="@id/verticalGuideLine"
|
||||
/>
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbNew360LookAround"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="360环视"
|
||||
android:paddingTop="25dp"
|
||||
android:paddingBottom="25dp"
|
||||
android:scaleY="1.2"
|
||||
android:scaleX="1.2"
|
||||
app:layout_constraintTop_toBottomOf="@id/tbNewV2NData"
|
||||
app:layout_constraintLeft_toRightOf="@+id/verticalGuideLine"
|
||||
app:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/tbWeakNetSlowDown"
|
||||
|
||||
@@ -218,9 +218,6 @@ class AiCloudIdentifyDataManager : IMoGoPlanningRottingListener,
|
||||
if (dataReceive) {
|
||||
// 请求地图开始漫游
|
||||
MogoMapUIController.getInstance().setRomaMode(FunctionBuildConfig.romaModeStyle)
|
||||
CallerMapRomaListener.invokeMapRoma(true)
|
||||
}else{
|
||||
CallerMapRomaListener.invokeMapRoma(false)
|
||||
}
|
||||
},
|
||||
{ errorMsg ->
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
||||
// 使用中台长链接
|
||||
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<Boolean>() {
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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<String> 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<Passport> 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)
|
||||
|
||||
Reference in New Issue
Block a user