[6.2.0][技术优化] 禁用xcrash的崩溃记录;移除卡顿检测的链路日志记录
This commit is contained in:
@@ -9,6 +9,7 @@ import android.content.BroadcastReceiver;
|
||||
import android.content.ContentProvider;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.BitmapFactory;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.opengl.GLSurfaceView;
|
||||
import android.os.SystemClock;
|
||||
import android.view.View;
|
||||
@@ -42,6 +43,13 @@ class JankPointAutoGenerator {
|
||||
)
|
||||
private PackageManager pm;
|
||||
|
||||
@LancetXGenerator(
|
||||
group = "main_block_check",
|
||||
type = Type.IPC,
|
||||
hookAllPublicMethods = true
|
||||
)
|
||||
private ConnectivityManager cm;
|
||||
|
||||
@LancetXGenerator(
|
||||
group = "main_block_check",
|
||||
type = Type.ACTIVITY,
|
||||
|
||||
@@ -167,8 +167,9 @@ public class HookInvokerImpl implements IHookInvoker {
|
||||
}
|
||||
builder.setLength(builder.length() - 1);
|
||||
}
|
||||
|
||||
VLog.w("HookHandler", "Junk Detected:" + builder);
|
||||
linkedLog(type, builder.toString());
|
||||
// linkedLog(type, builder.toString());
|
||||
if (flag) {
|
||||
extra.setLength(0);
|
||||
}
|
||||
@@ -284,19 +285,19 @@ public class HookInvokerImpl implements IHookInvoker {
|
||||
}
|
||||
}
|
||||
|
||||
private void linkedLog(Type type, String msg) {
|
||||
try {
|
||||
linkedLogInternal(type,msg);
|
||||
} catch (Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
@ChainLog(
|
||||
linkChainLog = ChainConstant.CHAIN_TYPE_ANR_LEAK,
|
||||
linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
nodeAliasCode = ChainConstant.CHAIN_CODE_MAIN_BLOCK,
|
||||
paramIndexes = { 0, 1 }
|
||||
)
|
||||
private void linkedLogInternal(Type type, String msg) {}
|
||||
// private void linkedLog(Type type, String msg) {
|
||||
// try {
|
||||
// linkedLogInternal(type,msg);
|
||||
// } catch (Throwable t) {
|
||||
// t.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @ChainLog(
|
||||
// linkChainLog = ChainConstant.CHAIN_TYPE_ANR_LEAK,
|
||||
// linkCode = ChainConstant.CHAIN_SOURCE_HMI,
|
||||
// nodeAliasCode = ChainConstant.CHAIN_CODE_MAIN_BLOCK,
|
||||
// paramIndexes = { 0, 1 }
|
||||
// )
|
||||
// private void linkedLogInternal(Type type, String msg) {}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
|
||||
@Volatile
|
||||
private var hasInit = false
|
||||
|
||||
private val linkedLog by lazy { MainBlockLinkedLog() }
|
||||
// private val linkedLog by lazy { MainBlockLinkedLog() }
|
||||
|
||||
override fun init(ctx: Context) {
|
||||
BlockDetector.init(BlockMetrics.Builder()
|
||||
@@ -75,7 +75,7 @@ internal class MoGoBlockProviderImpl: IMoGoBlockProvider, IBlockListener {
|
||||
} catch (t: Throwable) {
|
||||
Log.e(TAG, "onDumped error", t)
|
||||
}
|
||||
linkedLog.record(msg)
|
||||
// linkedLog.record(msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ internal class MoGoLogRecordProviderImpl: IMoGoLogRecordProvider,
|
||||
}
|
||||
})
|
||||
.crashConfig(CrashConfig.Builder()
|
||||
.enabled(true)
|
||||
.enabled(false)
|
||||
.crashDir(File(context.getExternalFilesDir(null), "logcat/crash"))
|
||||
.javaCrash(true)
|
||||
.anr(true)
|
||||
|
||||
Reference in New Issue
Block a user