Merge remote-tracking branch 'origin/dev_robotaxi-d_230612_3.3.0' into dev_robotaxi-d_230612_3.3.0
This commit is contained in:
@@ -5,7 +5,9 @@ import android.app.Activity
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.graphics.Color
|
||||
import android.net.*
|
||||
import android.os.Build
|
||||
import android.os.Process
|
||||
import android.text.Html
|
||||
@@ -16,6 +18,7 @@ import androidx.annotation.RequiresApi
|
||||
import androidx.appcompat.widget.PopupMenu
|
||||
import androidx.constraintlayout.widget.ConstraintLayout
|
||||
import androidx.core.content.ContextCompat
|
||||
import androidx.core.content.FileProvider
|
||||
import androidx.core.view.*
|
||||
import androidx.lifecycle.lifecycleScope
|
||||
import chassis.Chassis
|
||||
@@ -1363,6 +1366,38 @@ internal class DebugSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
//导出全量日志
|
||||
exportAllLogs?.onClick { v ->
|
||||
v.visibility = View.INVISIBLE
|
||||
logLoadingView?.visibility = View.VISIBLE
|
||||
v.scope.launch(Dispatchers.IO) {
|
||||
val file = CallerDevaToolsManager.logcat()?.export()
|
||||
if (file != null && file.exists()) {
|
||||
withContext(Dispatchers.Main) {
|
||||
var activity = AppStateManager.currentActivity()
|
||||
while (activity == null) {
|
||||
delay(2000)
|
||||
activity = AppStateManager.currentActivity()
|
||||
if (activity != null) {
|
||||
break
|
||||
}
|
||||
}
|
||||
activity?.startActivity(Intent.createChooser(Intent().also {
|
||||
it.action = Intent.ACTION_SEND
|
||||
it.type = "application/zip"
|
||||
it.putExtra(Intent.EXTRA_STREAM, FileProvider.getUriForFile(activity, "${activity.packageName}.fileProvider", file))
|
||||
}, "分享全量日志压缩包到"))
|
||||
}
|
||||
} else {
|
||||
ToastUtils.showShort("全量日志压缩文件生成失败")
|
||||
}
|
||||
withContext(Dispatchers.Main) {
|
||||
logLoadingView?.visibility = View.INVISIBLE
|
||||
exportAllLogs?.visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 展示、关闭日志过滤面板
|
||||
*/
|
||||
|
||||
@@ -320,7 +320,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
}
|
||||
}
|
||||
|
||||
mfTest.isEnabled = true
|
||||
mfTest.isEnabled = mf?.isConnected() ?: false
|
||||
mfTest.isChecked = mf?.isEnableTest() ?: false
|
||||
mfTest.setOnCheckedChangeListener { _, isChecked ->
|
||||
mf?.enableTest(isChecked)
|
||||
@@ -410,6 +410,8 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
mfStatusLayout?.also {
|
||||
it.hideLoadingView()
|
||||
it.setClickedTextAndTag("断开魔方连接", 0)
|
||||
mfTest?.isEnabled = true
|
||||
mfTest?.isChecked = CallerDevaToolsManager.mofang()?.isEnableTest() ?: false
|
||||
}
|
||||
}
|
||||
|
||||
@@ -417,6 +419,7 @@ internal class SOPSettingView @JvmOverloads constructor(
|
||||
mfStatusLayout?.also {
|
||||
it.hideLoadingView()
|
||||
it.setClickedTextAndTag("开始连接魔方", 1)
|
||||
mfTest?.isEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -260,8 +260,8 @@ open class MainActivity : MvpActivity<MainView?, MainPresenter?>(), MainView,
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_NATIVE_LEAK,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_LEAK,
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_ANR_LEAK,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_ANR_LEAK,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_RECORD_NATIVE_LEAK,
|
||||
paramIndexes = [0]
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintLeft_toRightOf="@id/hmi_traffic_light_iv"
|
||||
android:layout_marginStart="-30dp"
|
||||
android:layout_marginStart="-40dp"
|
||||
/>
|
||||
|
||||
<TextView
|
||||
|
||||
@@ -2217,6 +2217,50 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/bg_mf_sop_operator"
|
||||
android:paddingBottom="10dip"
|
||||
android:layout_marginStart="10dip"
|
||||
android:layout_marginEnd="10dip"
|
||||
android:paddingTop="10dip">
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/logLoadingView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible"
|
||||
android:layout_gravity="center">
|
||||
|
||||
<TextView
|
||||
android:text="正在压缩全量日志,请稍候"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dip"/>
|
||||
|
||||
<ProgressBar
|
||||
style="?android:attr/progressBarStyleSmall"
|
||||
android:layout_width="30dip"
|
||||
android:layout_height="30dip"
|
||||
android:layout_marginStart="10dip"/>
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/exportAllLogs"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="20dip"
|
||||
android:text="导出全量日志"
|
||||
android:gravity="center"
|
||||
android:layout_marginTop="10dip"
|
||||
android:layout_marginBottom="10dip" />
|
||||
</FrameLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
||||
Reference in New Issue
Block a user