-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
commit_hash:d0528c40499d287e3c230b24282c6e1c177aeef9
- Loading branch information
1 parent
ae0626e
commit ec5e1f0
Showing
27 changed files
with
347 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...cs/src/main/java/io/appmetrica/analytics/impl/crash/jvm/client/AnrFromApiReportingTask.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.appmetrica.analytics.impl.crash.jvm.client | ||
|
||
import android.os.Looper | ||
import io.appmetrica.analytics.impl.ClientServiceLocator | ||
import io.appmetrica.analytics.impl.crash.utils.FullStateConverter | ||
import io.appmetrica.analytics.impl.crash.utils.ThreadsStateDumper | ||
|
||
class AnrFromApiReportingTask( | ||
private val anrReporter: AnrReporter, | ||
private val allThreads: Map<Thread, Array<StackTraceElement>> | ||
) { | ||
|
||
private val mainThread: Thread = Looper.getMainLooper().thread | ||
|
||
fun execute() { | ||
val threadsStateDumper = ThreadsStateDumper( | ||
object : ThreadsStateDumper.ThreadProvider { | ||
override fun getMainThread(): Thread = this@AnrFromApiReportingTask.mainThread | ||
override fun getMainThreadStacktrace(): Array<StackTraceElement>? = allThreads[mainThread] | ||
override fun getAllThreadsStacktraces(): Map<Thread, Array<StackTraceElement>> = allThreads | ||
}, | ||
FullStateConverter(), | ||
ClientServiceLocator.getInstance().processDetector | ||
) | ||
|
||
anrReporter.reportAnr(threadsStateDumper.threadsDumpForAnr) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.