调试窗改版

1、调试窗改版,并且增加异常上报
2、隐藏工控机重启
This commit is contained in:
xuxinchao
2022-03-18 19:19:52 +08:00
committed by renwj
parent 03fe5d2b9a
commit 1b95cf65fc
11 changed files with 1994 additions and 518 deletions

View File

@@ -895,6 +895,14 @@ class MoGoHmiFragment : MvpFragment<MoGoWarningContract.View?, WaringPresenter?>
downloadVersion,
upgradeStatus
)
//将状态同步到调试窗
mDebugSettingView?.setAdUpgradeInfo(
upgradeMode,
downloadStatus,
currentProgress,
totalProgress,
downloadVersion,
upgradeStatus)
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/foreground_wtf" />
<corners android:radius="20px" />
<stroke
android:width="1dp"
android:color="@color/foreground_verbose" />
</shape>

View File

@@ -168,7 +168,7 @@
android:background="@color/color_FF2966EC"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/llSpeedPosition"
android:visibility="visible"/>
android:visibility="gone"/>
<TextView
android:id="@+id/tvSystemOperation"
@@ -182,7 +182,7 @@
android:textSize="42px"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/llSpeedPosition"
android:visibility="visible"/>
android:visibility="gone"/>
<com.mogo.eagle.core.function.hmi.ui.widget.CheckSystemView
android:id="@+id/checkSystemView"
@@ -191,7 +191,7 @@
android:layout_marginTop="40px"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/tvSystemOperation"
android:visibility="visible"/>
android:visibility="gone"/>
<View
android:id="@+id/viewSystemVersion"

View File

@@ -82,4 +82,11 @@
<style name="White" parent="Text">
<item name="android:textColor">#FFFFFF</item>
</style>
<style name="DebugSettingText">
<item name="android:textColor">#1A1A1A</item>
<item name="android:textSize">14sp</item>
<item name="android:layout_margin">@dimen/dp_10</item>
</style>
</resources>

View File

@@ -26,6 +26,11 @@ object AppConfigInfo {
var mogoToken: String? = null
var mogoSN: String? = null
//车牌号
var plateNumber: String? = null
//工控机MAC地址
var iPCMacAddress: String? = null
/**
* debug 测试环境--2
* release 生产环境--3

View File

@@ -65,6 +65,10 @@ object CallerAutoPilotManager {
providerApi?.recordPackage(1, Random(SystemClock.elapsedRealtime()).nextInt())
}
fun recordPackage(duration: Int){
providerApi?.recordPackage(1, Random(SystemClock.elapsedRealtime()).nextInt(),duration)
}
fun recordPackage(type: Int, id: Int) {
providerApi?.recordPackage(type, id)
}

View File

@@ -192,7 +192,7 @@ public final class DeviceUtils {
}
@RequiresPermission(ACCESS_WIFI_STATE)
private static String getMacAddressByWifiInfo() {
public static String getMacAddressByWifiInfo() {
try {
final WifiManager wifi = (WifiManager) Utils.getApp()
.getApplicationContext().getSystemService(WIFI_SERVICE);
@@ -522,4 +522,26 @@ public final class DeviceUtils {
}
return prefix + UUID.nameUUIDFromBytes(id.getBytes()).toString().replace("-", "");
}
/**
* 判断用户是否打开系统定位服务
* @return true 已经打开定位服务false 没有打开定位服务
*/
public static boolean isLocationEnabled() {
int locationMode = 0;
String locationProviders;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
try {
locationMode = Settings.Secure.getInt(Utils.getApp().getApplicationContext().getContentResolver(), Settings.Secure.LOCATION_MODE);
} catch (Settings.SettingNotFoundException e) {
e.printStackTrace();
return false;
}
return locationMode != Settings.Secure.LOCATION_MODE_OFF;
} else {
locationProviders = Settings.Secure.getString(Utils.getApp().getApplicationContext().getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED);
return !TextUtils.isEmpty(locationProviders);
}
}
}