Fix ComponentName property access in cloneAnr method

Changed from accessing non-existent className/packageName properties
to using flattenToShortString() method which returns the component
name in a standard format. This fixes the Kotlin compilation errors:
- Unresolved reference 'className'
- Unresolved reference 'packageName'

Co-authored-by: fankes <37344460+fankes@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-01-16 03:43:39 +00:00
parent c4108069a9
commit b89a4f3550

View File

@@ -161,8 +161,8 @@ data class AppErrorsInfoBean(
isAnr = true,
exceptionClassName = "ANR",
exceptionMessage = anrInfo?.cause ?: "Application Not Responding",
throwFileName = anrInfo?.activity?.className ?: "unknown",
throwClassName = anrInfo?.activity?.packageName ?: packageName ?: "unknown",
throwFileName = anrInfo?.activity?.flattenToShortString() ?: "unknown",
throwClassName = packageName ?: "unknown",
throwMethodName = "unknown",
throwLineNumber = -1,
stackTrace = anrInfo?.info?.trim() ?: "unknown",