[2.13.0-arch-opt] mofang view and status bar opt , pnvView add catch in enum
This commit is contained in:
@@ -52,7 +52,6 @@ dependencies {
|
|||||||
implementation rootProject.ext.dependencies.rxandroid
|
implementation rootProject.ext.dependencies.rxandroid
|
||||||
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
implementation rootProject.ext.dependencies.androidxconstraintlayout
|
||||||
implementation rootProject.ext.dependencies.amapnavi3dmap
|
implementation rootProject.ext.dependencies.amapnavi3dmap
|
||||||
implementation rootProject.ext.dependencies.amapsearch
|
|
||||||
|
|
||||||
implementation project(":OCH:mogo-och-common-module")
|
implementation project(":OCH:mogo-och-common-module")
|
||||||
compileOnly project(":libraries:mogo-map")
|
compileOnly project(":libraries:mogo-map")
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ ext {
|
|||||||
// amapnavi3dmap : "com.amap.api:navi-3dmap:8.0.1_3dmap8.0.1",
|
// amapnavi3dmap : "com.amap.api:navi-3dmap:8.0.1_3dmap8.0.1",
|
||||||
// amapsearch : "com.amap.api:search:7.9.0",
|
// amapsearch : "com.amap.api:search:7.9.0",
|
||||||
// amaplocation : "com.amap.api:location:5.5.0",
|
// amaplocation : "com.amap.api:location:5.5.0",
|
||||||
amapnavi3dmap : "com.amap.api:navi-3dmap:9.5.1_3dmap9.5.0",
|
amapnavi3dmap : "com.amap.api:navi-3dmap:9.6.0_3dmap9.6.0",
|
||||||
amapsearch : "com.amap.api:search:9.5.0",
|
|
||||||
amaplocation : "com.amap.api:location:6.2.0",
|
|
||||||
// json 转换
|
// json 转换
|
||||||
gson : "com.google.code.gson:gson:2.8.4",
|
gson : "com.google.code.gson:gson:2.8.4",
|
||||||
// 内存泄漏检测
|
// 内存泄漏检测
|
||||||
@@ -136,10 +135,8 @@ ext {
|
|||||||
mogologlib : "com.mogo.module:module-loglib:${LOGLIB_VERSION}",
|
mogologlib : "com.mogo.module:module-loglib:${LOGLIB_VERSION}",
|
||||||
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}",
|
kotlingradleplugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlin_version}",
|
||||||
crashreport : "com.mogo.test:crashreport:${CRASHREPORT_VERSION}",
|
crashreport : "com.mogo.test:crashreport:${CRASHREPORT_VERSION}",
|
||||||
crashreportbugly : "com.mogo.test:crashreport-bugly:${CRASHREPORT_BUGLY_VERSION}",
|
|
||||||
crashreportapmbyte : "com.mogo.test:crashreport-apmbyte:${CRASHREPORT_APMBYTE_VERSION}",
|
crashreportapmbyte : "com.mogo.test:crashreport-apmbyte:${CRASHREPORT_APMBYTE_VERSION}",
|
||||||
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
|
crashreportnoop : "com.mogo.test:crashreport-noop:${CRASHREPORT_NOOP_VERSION}",
|
||||||
crashreportupgrade : "com.mogo.test:crashreport-upgrade:${CRASHREPORT_UPGRADE_VERSION}",
|
|
||||||
apm_insight : 'com.volcengine:apm_insight:1.4.9.cn-rc.5',
|
apm_insight : 'com.volcengine:apm_insight:1.4.9.cn-rc.5',
|
||||||
apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.6-rc.14',
|
apm_insight_crash : 'com.volcengine:apm_insight_crash:1.4.6-rc.14',
|
||||||
cicle_indicator : 'me.relex:circleindicator:2.1.6',
|
cicle_indicator : 'me.relex:circleindicator:2.1.6',
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import android.content.Context
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.content.IntentFilter
|
import android.content.IntentFilter
|
||||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiManager.updateMfStatusView
|
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager.invokeMoFangStatus
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_F
|
import com.mogo.eagle.core.utilcode.mogo.logger.scene.SceneConstant.Companion.M_F
|
||||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||||
@@ -96,7 +96,7 @@ class MoFangManager private constructor() {
|
|||||||
BluetoothDevice.ACTION_ACL_CONNECTED -> { //蓝牙设备已连接
|
BluetoothDevice.ACTION_ACL_CONNECTED -> { //蓝牙设备已连接
|
||||||
if (!isMfConnect) {
|
if (!isMfConnect) {
|
||||||
// showBondedDevice(mBluetoothAdapter)
|
// showBondedDevice(mBluetoothAdapter)
|
||||||
updateMfStatusView(TAG, true)
|
invokeMoFangStatus(true)
|
||||||
isMfConnect = true
|
isMfConnect = true
|
||||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, true) }
|
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, true) }
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ class MoFangManager private constructor() {
|
|||||||
BluetoothDevice.ACTION_ACL_DISCONNECTED -> { //蓝牙设备已断开 主动更新
|
BluetoothDevice.ACTION_ACL_DISCONNECTED -> { //蓝牙设备已断开 主动更新
|
||||||
CallerLogger.d("$M_F${TAG}","bluetoothMonitorReceiver ACTION_ACL_DISCONNECTED ----- isMfConnect = $isMfConnect ")
|
CallerLogger.d("$M_F${TAG}","bluetoothMonitorReceiver ACTION_ACL_DISCONNECTED ----- isMfConnect = $isMfConnect ")
|
||||||
if (isMfConnect) {
|
if (isMfConnect) {
|
||||||
updateMfStatusView(TAG, false)
|
invokeMoFangStatus(false)
|
||||||
isMfConnect = false
|
isMfConnect = false
|
||||||
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, false) }
|
mContext?.let { SharedPrefsMgr.getInstance(it).putBoolean(MfConstants.BLUETOOTH_STATUS, false) }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -80,18 +80,17 @@ dependencies {
|
|||||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
||||||
|
|
||||||
compileOnly rootProject.ext.dependencies.mogocommons
|
compileOnly rootProject.ext.dependencies.mogocommons
|
||||||
compileOnly rootProject.ext.dependencies.mogo_core_res
|
api rootProject.ext.dependencies.mogo_core_res
|
||||||
compileOnly rootProject.ext.dependencies.mogo_core_utils
|
compileOnly rootProject.ext.dependencies.mogo_core_utils
|
||||||
compileOnly rootProject.ext.dependencies.mogo_core_function_datacenter
|
compileOnly rootProject.ext.dependencies.mogo_core_function_datacenter
|
||||||
compileOnly rootProject.ext.dependencies.mogo_core_function_call
|
compileOnly rootProject.ext.dependencies.mogo_core_function_call
|
||||||
compileOnly project(':libraries:mogo-adas')
|
compileOnly project(':libraries:mogo-adas')
|
||||||
} else {
|
} else {
|
||||||
api project(':test:crashreport-upgrade')
|
|
||||||
api project(':test:crashreport-apmbyte')
|
api project(':test:crashreport-apmbyte')
|
||||||
|
|
||||||
compileOnly project(':core:function-impl:mogo-core-function-datacenter')
|
compileOnly project(':core:function-impl:mogo-core-function-datacenter')
|
||||||
compileOnly project(':foudations:mogo-commons')
|
compileOnly project(':foudations:mogo-commons')
|
||||||
compileOnly project(':core:mogo-core-res')
|
api project(':core:mogo-core-res')
|
||||||
compileOnly project(':core:mogo-core-utils')
|
compileOnly project(':core:mogo-core-utils')
|
||||||
compileOnly project(':core:mogo-core-function-call')
|
compileOnly project(':core:mogo-core-function-call')
|
||||||
compileOnly project(':libraries:mogo-adas')
|
compileOnly project(':libraries:mogo-adas')
|
||||||
|
|||||||
@@ -87,10 +87,6 @@ class MoGoHmiProvider : IMoGoHmiProvider {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
|
||||||
CallerHmiViewControlListenerManager.updateMfStatus(StatusBarView.TAG, tag, status)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 不展示顶部弹窗,其它保留
|
* 不展示顶部弹窗,其它保留
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -77,8 +77,11 @@ class PncActionsView @JvmOverloads constructor(
|
|||||||
UiThreadHandler.post {
|
UiThreadHandler.post {
|
||||||
var actions: String? = null
|
var actions: String? = null
|
||||||
planningActionMsg.actionMsg?.let { it ->
|
planningActionMsg.actionMsg?.let { it ->
|
||||||
actions = PncActionsHelper.getAction(it.drivingState.number, it.drivingAction.number)
|
try {
|
||||||
|
actions = PncActionsHelper.getAction(it.drivingState.number, it.drivingAction.number)
|
||||||
|
} catch (e:Exception){
|
||||||
|
e.printStackTrace()
|
||||||
|
}
|
||||||
//如果是存在云端红绿灯数据条件下,设置云端数据
|
//如果是存在云端红绿灯数据条件下,设置云端数据
|
||||||
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
if (PncActionsHelper.isWaitingTrafficlight(it.drivingState.number, it.drivingAction.number)
|
||||||
&& mTrafficLightResult != null
|
&& mTrafficLightResult != null
|
||||||
|
|||||||
@@ -4,7 +4,13 @@ import android.content.Context
|
|||||||
import android.util.AttributeSet
|
import android.util.AttributeSet
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.widget.RelativeLayout
|
import android.widget.RelativeLayout
|
||||||
|
import com.mogo.eagle.core.data.mofang.MfConstants
|
||||||
|
import com.mogo.eagle.core.function.api.devatools.IMoGoDevaToolsListener
|
||||||
|
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsListenerManager
|
||||||
import com.mogo.eagle.core.function.hmi.R
|
import com.mogo.eagle.core.function.hmi.R
|
||||||
|
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
||||||
|
import kotlinx.android.synthetic.main.view_blue_tooth.view.*
|
||||||
|
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 魔戒蓝牙控件
|
* 魔戒蓝牙控件
|
||||||
@@ -14,10 +20,38 @@ class BlueToothView @JvmOverloads constructor(
|
|||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
defStyleAttr: Int = 0
|
defStyleAttr: Int = 0
|
||||||
) : RelativeLayout(context, attrs, defStyleAttr) {
|
) : RelativeLayout(context, attrs, defStyleAttr),IMoGoDevaToolsListener {
|
||||||
|
|
||||||
|
companion object{
|
||||||
|
private const val TAG = "BlueToothView"
|
||||||
|
}
|
||||||
|
|
||||||
init {
|
init {
|
||||||
LayoutInflater.from(context).inflate(R.layout.view_blue_tooth, this, true)
|
LayoutInflater.from(context).inflate(R.layout.view_blue_tooth, this, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun onAttachedToWindow() {
|
||||||
|
super.onAttachedToWindow()
|
||||||
|
val isBluetoothConnect =
|
||||||
|
SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
||||||
|
if (isBluetoothConnect) {
|
||||||
|
mofangStatus(true)
|
||||||
|
}
|
||||||
|
CallerDevaToolsListenerManager.addListener(TAG, this)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun mofangStatus(status: Boolean) {
|
||||||
|
super.mofangStatus(status)
|
||||||
|
if (status) {
|
||||||
|
mofangView.setImageResource(R.drawable.icon_bluetooth_p)
|
||||||
|
} else {
|
||||||
|
mofangView.setImageResource(R.drawable.blue_tooth)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onDetachedFromWindow() {
|
||||||
|
super.onDetachedFromWindow()
|
||||||
|
CallerDevaToolsListenerManager.removeListener(TAG)
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7,14 +7,12 @@ import android.view.LayoutInflater
|
|||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.LinearLayout
|
import android.widget.LinearLayout
|
||||||
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
import com.mogo.eagle.core.data.config.FunctionBuildConfig
|
||||||
import com.mogo.eagle.core.data.mofang.MfConstants
|
|
||||||
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
import com.mogo.eagle.core.function.api.hmi.view.IViewControlListener
|
||||||
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
import com.mogo.eagle.core.function.api.setting.IMoGoSkinModeChangeListener
|
||||||
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
import com.mogo.eagle.core.function.call.devatools.CallerDevaToolsManager
|
||||||
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
import com.mogo.eagle.core.function.call.hmi.CallerHmiViewControlListenerManager
|
||||||
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
import com.mogo.eagle.core.function.call.setting.CallerSkinModeListenerManager
|
||||||
import com.mogo.eagle.core.function.hmi.R
|
import com.mogo.eagle.core.function.hmi.R
|
||||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr
|
|
||||||
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
import kotlinx.android.synthetic.main.view_status_bar.view.*
|
||||||
import java.util.concurrent.CopyOnWriteArrayList
|
import java.util.concurrent.CopyOnWriteArrayList
|
||||||
|
|
||||||
@@ -39,11 +37,6 @@ class StatusBarView @JvmOverloads constructor(
|
|||||||
override fun onAttachedToWindow() {
|
override fun onAttachedToWindow() {
|
||||||
super.onAttachedToWindow()
|
super.onAttachedToWindow()
|
||||||
viewStatusBarRight.addView(BatteryGroupView(this.context))
|
viewStatusBarRight.addView(BatteryGroupView(this.context))
|
||||||
val isBluetoothConnect =
|
|
||||||
SharedPrefsMgr.getInstance(context).getBoolean(MfConstants.BLUETOOTH_STATUS, false)
|
|
||||||
if (isBluetoothConnect) {
|
|
||||||
updateMfStatus("MoFangManager", true)
|
|
||||||
}
|
|
||||||
|
|
||||||
//添加view控制
|
//添加view控制
|
||||||
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
CallerHmiViewControlListenerManager.addListener(TAG,this)
|
||||||
@@ -106,14 +99,6 @@ class StatusBarView @JvmOverloads constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun updateMfStatus(tag: String, status: Boolean) {
|
|
||||||
if (status) {
|
|
||||||
viewMofangStatus.setImageResource(R.drawable.icon_bluetooth_p)
|
|
||||||
} else {
|
|
||||||
viewMofangStatus.setImageResource(R.drawable.blue_tooth)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun setTextColor(color: Int) {
|
private fun setTextColor(color: Int) {
|
||||||
viewTextClock.setTextColor(color)
|
viewTextClock.setTextColor(color)
|
||||||
viewStatusBarTag.setTextColor(color)
|
viewStatusBarTag.setTextColor(color)
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
|||||||
decorView.clipToPadding = false
|
decorView.clipToPadding = false
|
||||||
var statusBarView = decorView.findViewWithTag<View>("status_bar")
|
var statusBarView = decorView.findViewWithTag<View>("status_bar")
|
||||||
if (statusBarView == null) {
|
if (statusBarView == null) {
|
||||||
statusBarView = StatusBarView(this)
|
statusBarView = statusBar
|
||||||
statusBarView.setTag("status_bar")
|
statusBarView.setTag("status_bar")
|
||||||
}
|
}
|
||||||
val statusBarLP = FrameLayout.LayoutParams(
|
val statusBarLP = FrameLayout.LayoutParams(
|
||||||
@@ -117,10 +117,10 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改statusBar 重写实现,需要继承 StatusBarView,xml中基础系统控件不要修改其id,拿来即用
|
* 修改statusBar重新赋值
|
||||||
* @return StatusBarView
|
* @return StatusBarView
|
||||||
*/
|
*/
|
||||||
protected val statusBarView: StatusBarView
|
protected val statusBar: View
|
||||||
get() = StatusBarView(this)
|
get() = StatusBarView(this)
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
@@ -353,30 +353,4 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 由于应用是单页面的,所以采用Fragment将各模块的UI进行分割解耦合
|
|
||||||
*
|
|
||||||
* @param newFragment 功能UI
|
|
||||||
* @param tagName UI绑定的Tag
|
|
||||||
* @param containerId 要加入的资源ID
|
|
||||||
*/
|
|
||||||
private fun addFragment(newFragment: Fragment, tagName: String, containerId: Int) {
|
|
||||||
var fragment = supportFragmentManager.findFragmentByTag(tagName)
|
|
||||||
if (fragment == null) {
|
|
||||||
fragment = newFragment
|
|
||||||
}
|
|
||||||
if (fragment == null) {
|
|
||||||
e(
|
|
||||||
SceneConstant.M_HMI + TAG,
|
|
||||||
"add fragment fail cause fragment == null, container is " + ResourcesHelper.getResNameById(
|
|
||||||
applicationContext, containerId
|
|
||||||
)
|
|
||||||
)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
supportFragmentManager.beginTransaction()
|
|
||||||
.replace(containerId, fragment, tagName)
|
|
||||||
.commitAllowingStateLoss()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -55,14 +55,11 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
start = System.currentTimeMillis();
|
start = System.currentTimeMillis();
|
||||||
connectAmiIp();
|
|
||||||
// Crash 日志收集
|
// Crash 日志收集
|
||||||
initCrashConfig();
|
initCrashConfig();
|
||||||
initLogConfig();
|
initLogConfig();
|
||||||
initTipToast();
|
initTipToast();
|
||||||
initModules();
|
initModules();
|
||||||
//查询是否有版本的更新
|
|
||||||
queryAppUpgrade();
|
|
||||||
if (ProcessUtils.isMainProcess(this)) {
|
if (ProcessUtils.isMainProcess(this)) {
|
||||||
initOverviewDb();
|
initOverviewDb();
|
||||||
if (DebugConfig.isDebug()) {
|
if (DebugConfig.isDebug()) {
|
||||||
@@ -80,15 +77,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void queryAppUpgrade() {
|
|
||||||
UiThreadHandler.postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
CallerDevaToolsManager.INSTANCE.queryAppUpgrade();
|
|
||||||
}
|
|
||||||
},9000);
|
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressLint("SimpleDateFormat")
|
@SuppressLint("SimpleDateFormat")
|
||||||
private void clearMessageBoxTable() {
|
private void clearMessageBoxTable() {
|
||||||
new Thread(() -> {
|
new Thread(() -> {
|
||||||
@@ -197,14 +185,6 @@ public abstract class MainMoGoApplication extends AbsMogoApplication {
|
|||||||
CallerFuncBizManager.getBizProvider().initOverViewDb(this);
|
CallerFuncBizManager.getBizProvider().initOverViewDb(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 连接ami
|
|
||||||
*/
|
|
||||||
private void connectAmiIp() {
|
|
||||||
String ipAddress = SharedPrefsMgr.getInstance(AbsMogoApplication.getApp().getBaseContext()).getString(MoGoConfig.OBU_IP, "192.168.1.199");
|
|
||||||
// AmiClientManager.getInstance().setObuIp(ipAddress);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initModules() {
|
private void initModules() {
|
||||||
CallerLogger.INSTANCE.d(M_HMI + TAG, "initModules");
|
CallerLogger.INSTANCE.d(M_HMI + TAG, "initModules");
|
||||||
// OBU 模块
|
// OBU 模块
|
||||||
|
|||||||
@@ -5,10 +5,11 @@
|
|||||||
android:layout_height="@dimen/dp_54">
|
android:layout_height="@dimen/dp_54">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:scaleType="fitXY"
|
android:id="@+id/mofangView"
|
||||||
android:src="@drawable/blue_tooth"
|
|
||||||
android:layout_width="@dimen/dp_54"
|
android:layout_width="@dimen/dp_54"
|
||||||
android:layout_height="@dimen/dp_54"
|
android:layout_height="@dimen/dp_54"
|
||||||
|
android:scaleType="fitXY"
|
||||||
|
android:src="@drawable/blue_tooth"
|
||||||
tools:ignore="ContentDescription" />
|
tools:ignore="ContentDescription" />
|
||||||
|
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
@@ -29,6 +29,7 @@
|
|||||||
android:textColor="@color/color_2C2E30"
|
android:textColor="@color/color_2C2E30"
|
||||||
android:textSize="@dimen/dp_35" />
|
android:textSize="@dimen/dp_35" />
|
||||||
|
|
||||||
|
<!--Wifi状态-->
|
||||||
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
|
<com.mogo.eagle.core.function.hmi.ui.widget.WifiStateView
|
||||||
android:layout_width="@dimen/dp_54"
|
android:layout_width="@dimen/dp_54"
|
||||||
android:layout_height="@dimen/dp_54"
|
android:layout_height="@dimen/dp_54"
|
||||||
@@ -36,8 +37,7 @@
|
|||||||
android:layout_marginStart="@dimen/dp_18" />
|
android:layout_marginStart="@dimen/dp_18" />
|
||||||
|
|
||||||
<!--魔方连接状态-->
|
<!--魔方连接状态-->
|
||||||
<ImageView
|
<com.mogo.eagle.core.function.hmi.ui.widget.BlueToothView
|
||||||
android:id="@+id/viewMofangStatus"
|
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:src="@drawable/blue_tooth"
|
android:src="@drawable/blue_tooth"
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
|||||||
// 设置是否是直播推流的主播
|
// 设置是否是直播推流的主播
|
||||||
clientConfig.isAnchor = true
|
clientConfig.isAnchor = true
|
||||||
when (DebugConfig.getCarMachineType()) {
|
when (DebugConfig.getCarMachineType()) {
|
||||||
DebugConfig.CAR_MACHINE_TYPE_BYD -> clientConfig.thirdPartyAppKey = "bydauto"
|
|
||||||
DebugConfig.CAR_MACHINE_TYPE_LENOVO -> clientConfig.thirdPartyAppKey = "pfieouqg"
|
DebugConfig.CAR_MACHINE_TYPE_LENOVO -> clientConfig.thirdPartyAppKey = "pfieouqg"
|
||||||
else -> clientConfig.thirdPartyAppKey = "wbvpzgar"
|
else -> clientConfig.thirdPartyAppKey = "wbvpzgar"
|
||||||
}
|
}
|
||||||
@@ -133,8 +132,6 @@ class HttpDnsStartUp : AndroidStartup<Boolean>() {
|
|||||||
} else {
|
} else {
|
||||||
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
|
clientConfig.thirdPartyDeviceId = Utils.getDevicesId()
|
||||||
}
|
}
|
||||||
// 设置循环检测间隔时间(每隔2小时loop一次httpDnsConfig)
|
|
||||||
clientConfig.loopCheckDelay = (60 * 60 * 2 * 1000).toLong()
|
|
||||||
//设置长链接的secretKey //todo 通过SHA1和包名找中台服务生成,后续包名分渠道,需要做对应操作
|
//设置长链接的secretKey //todo 通过SHA1和包名找中台服务生成,后续包名分渠道,需要做对应操作
|
||||||
clientConfig.secretKey = "YMj2VFDFxJ3Q4gNoZceJ"
|
clientConfig.secretKey = "YMj2VFDFxJ3Q4gNoZceJ"
|
||||||
|
|
||||||
|
|||||||
@@ -51,4 +51,8 @@ interface IMoGoDevaToolsListener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun mofangStatus(status:Boolean){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -36,9 +36,4 @@ interface IViewControlListener {
|
|||||||
*/
|
*/
|
||||||
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int){}
|
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int){}
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新魔方的连接状态
|
|
||||||
*/
|
|
||||||
fun updateMfStatus(tag: String, status: Boolean){}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,9 +136,5 @@ interface IMoGoHmiProvider :IProvider{
|
|||||||
*/
|
*/
|
||||||
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int)
|
fun updateStatusBarDownloadView(insert: Boolean, tag: String, progress: Int)
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新魔方的连接状态
|
|
||||||
*/
|
|
||||||
fun updateMfStatus(tag: String, status: Boolean)
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -55,4 +55,11 @@ object CallerDevaToolsListenerManager : CallerBase<IMoGoDevaToolsListener>() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun invokeMoFangStatus(status:Boolean){
|
||||||
|
M_LISTENERS.forEach {
|
||||||
|
val listener = it.value
|
||||||
|
listener.mofangStatus(status)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -212,11 +212,4 @@ object CallerHmiManager {
|
|||||||
hmiProviderApi?.updateStatusBarDownloadView(insert, tag, progress)
|
hmiProviderApi?.updateStatusBarDownloadView(insert, tag, progress)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新魔方的链接状态
|
|
||||||
*/
|
|
||||||
fun updateMfStatusView(tag: String, status: Boolean) {
|
|
||||||
hmiProviderApi?.updateMfStatus(tag, status)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -45,8 +45,4 @@ object CallerHmiViewControlListenerManager : CallerBase<IViewControlListener>()
|
|||||||
M_LISTENERS[tag]?.updateStatusBarDownloadView(insert, tag, progress)
|
M_LISTENERS[tag]?.updateStatusBarDownloadView(insert, tag, progress)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun updateMfStatus(tag: String, viewTag: String, status: Boolean) {
|
|
||||||
M_LISTENERS[tag]?.updateMfStatus(viewTag, status)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -243,6 +243,7 @@ object CallerVisualAngleManager {
|
|||||||
PriorityQueue<Record>()
|
PriorityQueue<Record>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Volatile
|
||||||
private var mLevel:Boolean = false
|
private var mLevel:Boolean = false
|
||||||
|
|
||||||
fun updateLongSightLevel(level:Boolean){
|
fun updateLongSightLevel(level:Boolean){
|
||||||
|
|||||||
@@ -43,9 +43,7 @@ public abstract class AbsMogoApplication extends Application {
|
|||||||
AppStateManager.INSTANCE.init(this);
|
AppStateManager.INSTANCE.init(this);
|
||||||
initRxJavaErrorHandler();
|
initRxJavaErrorHandler();
|
||||||
FinalizeCrashFixer.fix();
|
FinalizeCrashFixer.fix();
|
||||||
// if (!shouldInit()) {
|
|
||||||
AutoSize.checkAndInit(this);
|
AutoSize.checkAndInit(this);
|
||||||
// }
|
|
||||||
|
|
||||||
ScreenHelper.setScreenConfig(this);
|
ScreenHelper.setScreenConfig(this);
|
||||||
Utils.init(this);
|
Utils.init(this);
|
||||||
@@ -71,8 +69,7 @@ public abstract class AbsMogoApplication extends Application {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
View contentView = generateToastView(context, message, tipDrawable);
|
return generateToastView(context, message, tipDrawable);
|
||||||
return contentView;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,6 @@ import android.content.IntentFilter;
|
|||||||
import android.net.ConnectivityManager;
|
import android.net.ConnectivityManager;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
|
||||||
import com.mogo.commons.module.intent.IMogoIntentListener;
|
import com.mogo.commons.module.intent.IMogoIntentListener;
|
||||||
import com.mogo.commons.module.intent.IntentHandlerFactory;
|
import com.mogo.commons.module.intent.IntentHandlerFactory;
|
||||||
import com.mogo.commons.module.intent.IntentManager;
|
import com.mogo.commons.module.intent.IntentManager;
|
||||||
@@ -18,7 +17,6 @@ import com.mogo.commons.voice.AIAssist;
|
|||||||
import com.mogo.eagle.core.data.config.CloudPoiManager;
|
import com.mogo.eagle.core.data.config.CloudPoiManager;
|
||||||
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger;
|
||||||
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
import com.mogo.eagle.core.utilcode.util.NetworkUtils;
|
||||||
import com.mogo.realtime.api.MoGoAiCloudRealTime;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -57,10 +55,6 @@ public class MogoServices implements IMogoIntentListener {
|
|||||||
Intent intent = new Intent("com.freedom.ser.ACTION");
|
Intent intent = new Intent("com.freedom.ser.ACTION");
|
||||||
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES);
|
||||||
mContext.sendBroadcast(intent);
|
mContext.sendBroadcast(intent);
|
||||||
|
|
||||||
// if (DebugConfig.isNeedUploadCoordinatesDurationInTime()) {
|
|
||||||
// MoGoAiCloudRealTime.startRealTime(mContext, DebugConfig.getSocketAppId());
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void registerMogoReceiver(Context context) {
|
private void registerMogoReceiver(Context context) {
|
||||||
@@ -105,9 +99,6 @@ public class MogoServices implements IMogoIntentListener {
|
|||||||
|
|
||||||
public void destroy() {
|
public void destroy() {
|
||||||
CallerLogger.INSTANCE.d(M_OLD_OTHER + TAG, "MogoServices do nothings.");
|
CallerLogger.INSTANCE.d(M_OLD_OTHER + TAG, "MogoServices do nothings.");
|
||||||
// if (DebugConfig.isNeedUploadCoordinatesDurationInTime()) {
|
|
||||||
// MoGoAiCloudRealTime.stopRealTime();
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ MOGO_LOCATION_VERSION=1.4.3.32-beta3
|
|||||||
MOGO_TELEMATIC_VERSION=1.4.3.32-beta2
|
MOGO_TELEMATIC_VERSION=1.4.3.32-beta2
|
||||||
######## MogoAiCloudSDK Version ########
|
######## MogoAiCloudSDK Version ########
|
||||||
# 自研地图
|
# 自研地图
|
||||||
MAP_SDK_VERSION=2.10.0.2
|
MAP_SDK_VERSION=2.10.0.2_test_03
|
||||||
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
MAP_SDK_OPERATION_VERSION=1.1.4.1
|
||||||
# websocket
|
# websocket
|
||||||
WEBSOCKET_VERSION=1.1.7
|
WEBSOCKET_VERSION=1.1.7
|
||||||
@@ -119,10 +119,8 @@ MOGO_MODULE_V2X_VERSION=2.1.16.10
|
|||||||
MOGO_MODULE_OBU_MOGO_VERSION=2.1.16.10
|
MOGO_MODULE_OBU_MOGO_VERSION=2.1.16.10
|
||||||
# bugly
|
# bugly
|
||||||
CRASHREPORT_VERSION=2.1.16.10
|
CRASHREPORT_VERSION=2.1.16.10
|
||||||
CRASHREPORT_BUGLY_VERSION=2.1.16.10
|
|
||||||
CRASHREPORT_NOOP_VERSION=2.1.16.10
|
CRASHREPORT_NOOP_VERSION=2.1.16.10
|
||||||
CRASHREPORT_APMBYTE_VERSION=2.1.16.10
|
CRASHREPORT_APMBYTE_VERSION=2.1.16.10
|
||||||
CRASHREPORT_UPGRADE_VERSION=2.1.16.10
|
|
||||||
## tts
|
## tts
|
||||||
TTS_BASE_VERSION=2.1.16.10
|
TTS_BASE_VERSION=2.1.16.10
|
||||||
TTS_DI_VERSION=2.1.16.10
|
TTS_DI_VERSION=2.1.16.10
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ public class AMapWrapper implements IMogoMap {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
long time = markerOptionsArrayList.get(0).getTime();
|
long time = markerOptionsArrayList.get(0).getTime();
|
||||||
//todo 最后一个参数,是否管理锚点的删除
|
// 最后一个参数,是否管理锚点的删除
|
||||||
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 0);
|
MarkerHelper.INSTANCE.updateBatchMarkerPositon(markerOptionsArrayList, false, FunctionBuildConfig.isBeautyMode ? 8.0f : 0f, 1, time, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
:test:crashreport
|
:test:crashreport
|
||||||
:test:crashreport-apm
|
:test:crashreport-apm
|
||||||
:test:crashreport-noop
|
:test:crashreport-noop
|
||||||
:test:crashreport-upgrade
|
|
||||||
:core:function-impl:mogo-core-function-datacenter
|
:core:function-impl:mogo-core-function-datacenter
|
||||||
:core:function-impl:mogo-core-function-hmi
|
:core:function-impl:mogo-core-function-hmi
|
||||||
:core:function-impl:mogo-core-function-map
|
:core:function-impl:mogo-core-function-map
|
||||||
|
|||||||
@@ -55,9 +55,7 @@ include ':tts:tts-pad'
|
|||||||
|
|
||||||
// 测试DEBUG
|
// 测试DEBUG
|
||||||
include ':test:crashreport'
|
include ':test:crashreport'
|
||||||
//include ':test:crashreport-bugly'
|
|
||||||
include ':test:crashreport-noop'
|
include ':test:crashreport-noop'
|
||||||
include ':test:crashreport-upgrade'
|
|
||||||
include ':test:crashreport-apmbyte'
|
include ':test:crashreport-apmbyte'
|
||||||
|
|
||||||
//OCH 业务模块
|
//OCH 业务模块
|
||||||
|
|||||||
1
test/crashreport-bugly/.gitignore
vendored
1
test/crashreport-bugly/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-android-extensions'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'com.alibaba.arouter'
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
||||||
// buildToolsVersion rootProject.ext.android.buildToolsVersion
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
||||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
||||||
versionCode Integer.valueOf(VERSION_CODE)
|
|
||||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
|
||||||
|
|
||||||
ndk {
|
|
||||||
// 设置支持的SO库架构
|
|
||||||
abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
consumerProguardFiles 'consumer-rules.pro'
|
|
||||||
|
|
||||||
//ARouter apt 参数
|
|
||||||
kapt {
|
|
||||||
useBuildCache = false
|
|
||||||
arguments {
|
|
||||||
arg("AROUTER_MODULE_NAME", project.getName())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
||||||
implementation rootProject.ext.dependencies.androidxappcompat
|
|
||||||
|
|
||||||
implementation rootProject.ext.dependencies.arouter
|
|
||||||
kapt rootProject.ext.dependencies.aroutercompiler
|
|
||||||
|
|
||||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
|
||||||
api rootProject.ext.dependencies.crashreport
|
|
||||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
|
||||||
implementation rootProject.ext.dependencies.mogocommons
|
|
||||||
} else {
|
|
||||||
api project(":test:crashreport")
|
|
||||||
implementation project(':core:mogo-core-utils')
|
|
||||||
implementation project(":foudations:mogo-commons")
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation 'com.tencent.bugly:crashreport_upgrade:1.6.1'
|
|
||||||
//其中latest.release指代最新Bugly SDK版本号,也可以指定明确的版本号,例如2.1.9
|
|
||||||
implementation 'com.tencent.bugly:nativecrashreport:latest.release'
|
|
||||||
//其中latest.release指代最新Bugly NDK版本号,也可以指定明确的版本号,例如3.0
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
GROUP=com.mogo.test
|
|
||||||
POM_ARTIFACT_ID=crashreport-bugly
|
|
||||||
VERSION_CODE=1
|
|
||||||
21
test/crashreport-bugly/proguard-rules.pro
vendored
21
test/crashreport-bugly/proguard-rules.pro
vendored
@@ -1,21 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# You can control the set of applied configuration files using the
|
|
||||||
# proguardFiles setting in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
|
||||||
# debugging stack traces.
|
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
|
||||||
# hide the original source file name.
|
|
||||||
#-renamesourcefileattribute SourceFile
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
package="com.mogo.test.crashreport.bugly">
|
|
||||||
|
|
||||||
/
|
|
||||||
</manifest>
|
|
||||||
@@ -1,76 +0,0 @@
|
|||||||
package com.mogo.test.crashreport.bugly;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
|
||||||
import com.mogo.cloud.passport.MoGoAiCloudClientConfig;
|
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
|
||||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
|
||||||
import com.mogo.test.crashreport.CrashReportConstants;
|
|
||||||
import com.mogo.test.crashreport.ITestCrashReportProvider;
|
|
||||||
import com.tencent.bugly.Bugly;
|
|
||||||
import com.tencent.bugly.crashreport.CrashReport;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author congtaowang
|
|
||||||
* @since 2020/9/9
|
|
||||||
*
|
|
||||||
* 描述
|
|
||||||
*/
|
|
||||||
//@Route(path = CrashReportConstants.PATH)
|
|
||||||
public class BuglyCrashReportProvider implements ITestCrashReportProvider {
|
|
||||||
|
|
||||||
private static final String TAG = "BuglyCrashReportProvider";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(Context context) {
|
|
||||||
String packageName = context.getPackageName();
|
|
||||||
String processName = getProcessName(android.os.Process.myPid());
|
|
||||||
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
|
|
||||||
strategy.setUploadProcess(processName == null || processName.equals(packageName));
|
|
||||||
//该用户本次启动后的异常日志用户ID都将是 sn
|
|
||||||
CrashReport.setUserId(MoGoAiCloudClientConfig.getInstance().getSn());
|
|
||||||
String productFlavor = DebugConfig.getProductFlavor();
|
|
||||||
strategy.setAppChannel(productFlavor);
|
|
||||||
Bugly.init(context, CrashReportConstants.buglyAppID, true, strategy);
|
|
||||||
Bugly.putUserData(context, "serial", MoGoAiCloudClientConfig.getInstance().getSn());
|
|
||||||
String mapSDKVersion = AppUtils.getCustomMapSDKVersion(context);
|
|
||||||
Bugly.putUserData(context, "MAP_SDK_VERSION", mapSDKVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取进程号对应的进程名
|
|
||||||
*
|
|
||||||
* @param pid 进程号
|
|
||||||
* @return 进程名
|
|
||||||
*/
|
|
||||||
private static String getProcessName(int pid) {
|
|
||||||
BufferedReader reader = null;
|
|
||||||
try {
|
|
||||||
reader = new BufferedReader(new FileReader("/proc/" + pid + "/cmdline"));
|
|
||||||
String processName = reader.readLine();
|
|
||||||
if (!TextUtils.isEmpty(processName)) {
|
|
||||||
processName = processName.trim();
|
|
||||||
}
|
|
||||||
return processName;
|
|
||||||
} catch (Throwable throwable) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
if (reader != null) {
|
|
||||||
reader.close();
|
|
||||||
}
|
|
||||||
} catch (IOException exception) {
|
|
||||||
exception.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
1
test/crashreport-upgrade/.gitignore
vendored
1
test/crashreport-upgrade/.gitignore
vendored
@@ -1 +0,0 @@
|
|||||||
/build
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
plugins {
|
|
||||||
id 'com.android.library'
|
|
||||||
id 'kotlin-android'
|
|
||||||
id 'kotlin-android-extensions'
|
|
||||||
id 'kotlin-kapt'
|
|
||||||
id 'com.alibaba.arouter'
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
compileSdkVersion rootProject.ext.android.compileSdkVersion
|
|
||||||
defaultConfig {
|
|
||||||
minSdkVersion rootProject.ext.android.minSdkVersion
|
|
||||||
targetSdkVersion rootProject.ext.android.targetSdkVersion
|
|
||||||
versionCode Integer.valueOf(VERSION_CODE)
|
|
||||||
versionName getValueFromRootProperties("${project.name.replace("-", "_").toUpperCase()}_VERSION")
|
|
||||||
|
|
||||||
ndk {
|
|
||||||
// 设置支持的SO库架构
|
|
||||||
abiFilters 'armeabi' //, 'x86', 'armeabi-v7a', 'x86_64', 'arm64-v8a'
|
|
||||||
}
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
consumerProguardFiles 'consumer-rules.pro'
|
|
||||||
|
|
||||||
//ARouter apt 参数
|
|
||||||
kapt {
|
|
||||||
useBuildCache = false
|
|
||||||
arguments {
|
|
||||||
arg("AROUTER_MODULE_NAME", project.getName())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation fileTree(dir: "libs", include: ["*.jar"])
|
|
||||||
implementation rootProject.ext.dependencies.androidxappcompat
|
|
||||||
|
|
||||||
implementation rootProject.ext.dependencies.arouter
|
|
||||||
kapt rootProject.ext.dependencies.aroutercompiler
|
|
||||||
|
|
||||||
if (Boolean.valueOf(USE_MAVEN_PACKAGE)) {
|
|
||||||
api rootProject.ext.dependencies.crashreport
|
|
||||||
implementation rootProject.ext.dependencies.mogo_core_utils
|
|
||||||
implementation rootProject.ext.dependencies.mogocommons
|
|
||||||
} else {
|
|
||||||
api project(":test:crashreport")
|
|
||||||
implementation project(':core:mogo-core-utils')
|
|
||||||
implementation project(":foudations:mogo-commons")
|
|
||||||
}
|
|
||||||
|
|
||||||
implementation 'com.tencent.bugly:crashreport_upgrade:1.6.1'
|
|
||||||
//其中latest.release指代最新版本号,也可以指定明确的版本号,例如1.2.0
|
|
||||||
}
|
|
||||||
|
|
||||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
GROUP=com.mogo.test
|
|
||||||
POM_ARTIFACT_ID=crashreport-upgrade
|
|
||||||
VERSION_CODE=1
|
|
||||||
24
test/crashreport-upgrade/proguard-rules.pro
vendored
24
test/crashreport-upgrade/proguard-rules.pro
vendored
@@ -1,24 +0,0 @@
|
|||||||
# Add project specific ProGuard rules here.
|
|
||||||
# You can control the set of applied configuration files using the
|
|
||||||
# proguardFiles setting in build.gradle.
|
|
||||||
#
|
|
||||||
# For more details, see
|
|
||||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
||||||
|
|
||||||
# If your project uses WebView with JS, uncomment the following
|
|
||||||
# and specify the fully qualified class name to the JavaScript interface
|
|
||||||
# class:
|
|
||||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
||||||
# public *;
|
|
||||||
#}
|
|
||||||
|
|
||||||
# Uncomment this to preserve the line number information for
|
|
||||||
# debugging stack traces.
|
|
||||||
#-keepattributes SourceFile,LineNumberTable
|
|
||||||
|
|
||||||
# If you keep the line number information, uncomment this to
|
|
||||||
# hide the original source file name.
|
|
||||||
#-renamesourcefileattribute SourceFile
|
|
||||||
-dontwarn com.tencent.bugly.**
|
|
||||||
-keep public class com.tencent.bugly.**{*;}
|
|
||||||
-keep class android.support.**{*;}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
package="com.mogo.test.crashreport.upgrade">
|
|
||||||
|
|
||||||
<application>
|
|
||||||
<provider
|
|
||||||
android:name="androidx.core.content.FileProvider"
|
|
||||||
android:authorities="${applicationId}.fileProvider"
|
|
||||||
android:exported="false"
|
|
||||||
tools:replace="android:authorities"
|
|
||||||
android:grantUriPermissions="true">
|
|
||||||
<meta-data
|
|
||||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
|
||||||
android:resource="@xml/provider_paths" />
|
|
||||||
</provider>
|
|
||||||
|
|
||||||
<activity
|
|
||||||
android:name="com.tencent.bugly.beta.ui.BetaActivity"
|
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize|locale"
|
|
||||||
android:theme="@android:style/Theme.Translucent" />
|
|
||||||
</application>
|
|
||||||
</manifest>
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
package com.mogo.test.crashreport.upgrade;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author donghongyu
|
|
||||||
* @since 2020/9/9
|
|
||||||
* <p>
|
|
||||||
* 描述
|
|
||||||
*/
|
|
||||||
public class UpgradeReportConstants {
|
|
||||||
|
|
||||||
public static final String PATH = "/upgradereport/api";
|
|
||||||
|
|
||||||
public static final String NAME = "UpgradeReportApi";
|
|
||||||
}
|
|
||||||
@@ -1,78 +0,0 @@
|
|||||||
package com.mogo.test.crashreport.upgrade;
|
|
||||||
|
|
||||||
import android.content.Context;
|
|
||||||
import android.text.TextUtils;
|
|
||||||
|
|
||||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
|
||||||
import com.alibaba.android.arouter.facade.template.IProvider;
|
|
||||||
import com.mogo.commons.debug.DebugConfig;
|
|
||||||
import com.mogo.eagle.core.utilcode.mogo.storage.SharedPrefsMgr;
|
|
||||||
import com.mogo.eagle.core.utilcode.util.AppUtils;
|
|
||||||
import com.mogo.test.crashreport.CrashReportConstants;
|
|
||||||
import com.tencent.bugly.Bugly;
|
|
||||||
import com.tencent.bugly.crashreport.CrashReport;
|
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author donghongyu
|
|
||||||
* @since 2020/9/9
|
|
||||||
* <p>
|
|
||||||
* 升级模块
|
|
||||||
*/
|
|
||||||
@Route(path = UpgradeReportConstants.PATH)
|
|
||||||
public class UpgradeReportProvider implements IProvider {
|
|
||||||
|
|
||||||
private static final String TAG = "UpgradeReportProvider";
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void init(Context context) {
|
|
||||||
String packageName = context.getPackageName();
|
|
||||||
String processName = getProcessName(android.os.Process.myPid());
|
|
||||||
CrashReport.UserStrategy strategy = new CrashReport.UserStrategy(context);
|
|
||||||
strategy.setUploadProcess(processName == null || processName.equals(packageName));
|
|
||||||
|
|
||||||
String productFlavor = DebugConfig.getProductFlavor();
|
|
||||||
strategy.setAppChannel(productFlavor);
|
|
||||||
Bugly.init(context, CrashReportConstants.buglyAppID, true, strategy);
|
|
||||||
String sn = SharedPrefsMgr.getInstance(context).getString("sn");
|
|
||||||
if (sn != null && !sn.isEmpty()) {
|
|
||||||
Bugly.putUserData(context, "serial", sn);
|
|
||||||
}
|
|
||||||
String mapSDKVersion = DebugConfig.getMapVersion();
|
|
||||||
Bugly.putUserData(context, "MAP_SDK_VERSION", mapSDKVersion);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取进程号对应的进程名
|
|
||||||
*
|
|
||||||
* @param pid 进程号
|
|
||||||
* @return 进程名
|
|
||||||
*/
|
|
||||||
private static String getProcessName(int pid) {
|
|
||||||
BufferedReader reader = null;
|
|
||||||
try {
|
|
||||||
reader = new BufferedReader(new FileReader("/proc/" + pid + "/cmdline"));
|
|
||||||
String processName = reader.readLine();
|
|
||||||
if (!TextUtils.isEmpty(processName)) {
|
|
||||||
processName = processName.trim();
|
|
||||||
}
|
|
||||||
return processName;
|
|
||||||
} catch (Throwable throwable) {
|
|
||||||
throwable.printStackTrace();
|
|
||||||
} finally {
|
|
||||||
try {
|
|
||||||
if (reader != null) {
|
|
||||||
reader.close();
|
|
||||||
}
|
|
||||||
} catch (IOException exception) {
|
|
||||||
exception.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
|
||||||
<!-- /storage/emulated/0/Download/${applicationId}/.beta/apk-->
|
|
||||||
<external-path name="beta_external_path" path="Download/"/>
|
|
||||||
<!--/storage/emulated/0/Android/data/${applicationId}/files/apk/-->
|
|
||||||
<external-path name="beta_external_files_path" path="Android/data/"/>
|
|
||||||
</paths>
|
|
||||||
Reference in New Issue
Block a user