Merge branch 'dev_arch_opt_3.0' into 'dev_robobus-m1-p-app-module_1.1.0_230112_1.1.0'
Dev arch opt 3.0 See merge request zhjt/AndroidApp/MoGoEagleEye!687
This commit is contained in:
@@ -14,23 +14,29 @@ import com.knightboost.lancet.api.annotations.*
|
||||
@Group("crash_fix")
|
||||
class CrashFix {
|
||||
|
||||
/**
|
||||
* 修正Android8.0及之后,后台启动Service引起的崩溃
|
||||
* java.lang.IllegalStateException: Not allowed to start service Intent {
|
||||
* act=com.zhidao.cosupload.service.UPLOAD_ACTION cmp=com.mogo.launcher.f/com.zhidao.cosupload.service.UploadService }: app is in background uid UidRecord{6443b7b u0a404 LAST bg:+1m15s362ms idle change:idle procs:1 seq(0,0,0)}
|
||||
*/
|
||||
@Insert(mayCreateSuper = true)
|
||||
@TargetClass("android.content.Context", scope = LEAF)
|
||||
@TargetMethod(methodName = "startService")
|
||||
fun fixStartServiceCrash(intent: Intent): ComponentName? {
|
||||
return try {
|
||||
Origin.call() as ComponentName?
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
null
|
||||
|
||||
companion object {
|
||||
|
||||
/**
|
||||
* 修正Android8.0及之后,后台启动Service引起的崩溃
|
||||
* java.lang.IllegalStateException: Not allowed to start service Intent {
|
||||
* act=com.zhidao.cosupload.service.UPLOAD_ACTION cmp=com.mogo.launcher.f/com.zhidao.cosupload.service.UploadService }: app is in background uid UidRecord{6443b7b u0a404 LAST bg:+1m15s362ms idle change:idle procs:1 seq(0,0,0)}
|
||||
*/
|
||||
@JvmStatic
|
||||
@TargetClass("android.content.Context", scope = ALL)
|
||||
@TargetMethod(methodName = "startService")
|
||||
@ReplaceInvoke
|
||||
fun fixStartServiceCrash(context: Context, intent: Intent): ComponentName? {
|
||||
return try {
|
||||
return context.startService(intent)
|
||||
} catch (t: Throwable) {
|
||||
t.printStackTrace()
|
||||
null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* https://console.volcengine.com/apmplus/app/crash/detail/java/bb387ccd9c1a3c6ad2ede4e6f501a5e7?aid=302368&date=%7B%22granularity%22%3A%221h%22%2C%22duration%22%3A%22recently%22%2C%22range%22%3A%221w%22%7D&filters=%7B%22type%22%3A%22and%22%2C%22sub_conditions%22%3A%5B%7B%22dimension%22%3A%22os%22%2C%22op%22%3A%22in%22%2C%22type%22%3A%22expression%22%2C%22values%22%3A%5B%22Android%22%5D%7D%5D%7D&org_id=2100068151&os=Android&page_number=6&status=%5B%22pending%22%2C%22processing%22%2C%22solved%22%2C%22reopen%22%5D
|
||||
* java.lang.IllegalArgumentException: Invalid audio buffer size.
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.mogo.support.obu.model.MogoObuRsiWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuRsmWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuRvWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuSpatWarningData;
|
||||
import com.mogo.support.obu.model.MogoObuSystemStatusData;
|
||||
import com.mogo.support.obu.model.advance.AccFourAxes;
|
||||
import com.mogo.support.obu.model.advance.DateTime;
|
||||
import com.mogo.support.obu.model.advance.NodeId;
|
||||
@@ -293,6 +294,11 @@ public class ObuTest {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onObuSystemStatus(MogoObuSystemStatusData data) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onGnssInfo(MessagePad.GnssInfo gnssInfo) {
|
||||
Log.i("ddddd", "onGnssInfo=\n" + TextFormat.printer().escapingNonAscii(false).printToString(gnssInfo));
|
||||
|
||||
@@ -93,7 +93,7 @@ ext {
|
||||
|
||||
// obu sdk
|
||||
obusdk : "com.zhidao.enterprise.smartv2x:smartv2x:1.0.0.3",
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.0_beta3',
|
||||
mogoobu : 'com.mogo.support.obu:mogo-obu:1.1.0_beta4',
|
||||
|
||||
// google
|
||||
googlezxing : "com.google.zxing:core:3.3.3",
|
||||
|
||||
@@ -194,6 +194,15 @@ class MogoPrivateObuNewManager private constructor() : OnUpgradeListener {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU 系统状态
|
||||
*
|
||||
* @param data 系统状态
|
||||
*/
|
||||
override fun onObuSystemStatus(data: MogoObuSystemStatusData?) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* HV车辆基础信息 gnssInfo
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,15 @@ object MoGoObuListenerImpl : OnObuListener {
|
||||
CallerObuConnectListenerManager.invokeObuConnectListener()
|
||||
}
|
||||
|
||||
/**
|
||||
* OBU 系统状态
|
||||
*
|
||||
* @param data 系统状态
|
||||
*/
|
||||
override fun onObuSystemStatus(data: MogoObuSystemStatusData?) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* HV车辆基础信息
|
||||
|
||||
@@ -1607,7 +1607,7 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
tvAutopilotInfo.text = autopilotJson
|
||||
tvIpcInfo.text = autopilotJson
|
||||
tvIpcInfoKey.text = autopilotJson
|
||||
tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)
|
||||
tvCmdbCarInfoContent.text = SharedPrefsMgr.getInstance(context).getString(SharedPrefsConstants.CAR_INFO)?:""
|
||||
|
||||
tvCarInfo.text =
|
||||
"GPS时间:${(mGnssInfo?.satelliteTime?.times(1000))?.toLong()}\n" +
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.zhidao.support.obu;
|
||||
|
||||
import com.mogo.support.obu.ObuScene;
|
||||
import com.mogo.support.obu.constants.Define;
|
||||
import com.mogo.support.obu.model.MogoObuSystemStatusData;
|
||||
|
||||
import mogo.telematics.pad.MessagePad;
|
||||
|
||||
@@ -15,6 +16,12 @@ public interface OnObuListener {
|
||||
*/
|
||||
void onConnectStatus(@Define.ConnectStatus int connectStatus);
|
||||
|
||||
/**
|
||||
* OBU 系统状态
|
||||
*
|
||||
* @param data 系统状态
|
||||
*/
|
||||
void onObuSystemStatus(MogoObuSystemStatusData data);
|
||||
|
||||
/**
|
||||
* HV车辆基础信息
|
||||
|
||||
Reference in New Issue
Block a user