We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f01f289 commit bb746ebCopy full SHA for bb746eb
1 file changed
floatingx/src/main/java/com/petterp/floatingx/FloatingX.kt
@@ -118,8 +118,10 @@ object FloatingX {
118
@JvmStatic
119
fun uninstallAll() {
120
if (fxs.isEmpty()) return
121
- for (fx in fxs.values) {
122
- fx.cancel()
+ // 这里需要避免 ConcurrentModificationException
+ val keys = fxs.keys.toList()
123
+ keys.forEach {
124
+ fxs[it]?.cancel()
125
}
126
127
0 commit comments