Blankj / Blankj/AndroidUtilCode
多线程环境下获取当前栈顶ActivityUtils.getTopActivity() crash
- Lenguaje dominante
- Java
- Estrellas
- 33.6k
- Forks
- 10.6k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
## Describe the bug
A clear and concise description of what the bug is.
- The version of AndroidUtilCode: utilcode:1.30.6
- The version of device: API 31
## The code of bug
getTopActivity()
```
多线程环境下获取当前栈顶ActivityUtils.getTopActivity()
## The stack of crash
# pool-29-thread-1(5773)
java.util.ConcurrentModificationException
解析原始
java.util.LinkedList$LinkIterator.next(LinkedList.java:124)
java.util.LinkedList.addAll(LinkedList.java:394)
java.util.LinkedList.(LinkedList.java:261)
com.blankj.utilcode.util.UtilsActivityLifecycleImpl.java.util.List getActivityList()(UtilsActivityLifecycleImpl.java:69)
com.blankj.utilcode.util.UtilsActivityLifecycleImpl.android.app.Activity getTopActivity()(UtilsActivityLifecycleImpl.java:57)
com.blankj.utilcode.util.UtilsBridge.android.app.Activity getTopActivity()(UtilsBridge.java)
com.blankj.utilcode.util.ActivityUtils.android.app.Activity getTopActivity()(ActivityUtils.java)
## Screenshots
If applicable, add screenshots to help explain your problem.
## Please delete the current line and the following.
Thank you for supporting [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.