File tree Expand file tree Collapse file tree 9 files changed +15
-11
lines changed
lib/src/main/java/com/blankj/utilcode/util Expand file tree Collapse file tree 9 files changed +15
-11
lines changed Original file line number Diff line number Diff line change 1+ * ` 18/12/24 ` [ fix] Utils$ActivityLifecycleImpl.consumeOnActivityDestroyedListener ConcurrentModificationException. Publish v1.22.7.
12* ` 18/12/22 ` [ fix] AdaptScreenUtils#pt2px don't work when start webview. Publish v1.22.6.
23* ` 18/12/21 ` [ add] LogUtils support print Map, Collection and Object to String.
34* ` 18/12/19 ` [ fix] AdaptScreenUtils don't work in MIUI on Android 5.1.1. Publish v1.22.5.
Original file line number Diff line number Diff line change 4141
4242[ logo ] : https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343
44- [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.6 -brightgreen.svg
44+ [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.7 -brightgreen.svg
4545[ auc ] : https://github.com/Blankj/AndroidUtilCode
4646
4747[ apiSvg ] : https://img.shields.io/badge/API-14+-brightgreen.svg
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen
4141
4242[ logo ] : https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
4343
44- [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.6 -brightgreen.svg
44+ [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.7 -brightgreen.svg
4545[ auc ] : https://github.com/Blankj/AndroidUtilCode
4646
4747[ apiSvg ] : https://img.shields.io/badge/API-14+-brightgreen.svg
Original file line number Diff line number Diff line change 55 compileSdkVersion = 27
66 minSdkVersion = 14
77 targetSdkVersion = 27
8- versionCode = 1_022_006
9- versionName = ' 1.22.6 ' // E.g. 1.9.72 => 1,009,072
8+ versionCode = 1_022_007
9+ versionName = ' 1.22.7 ' // E.g. 1.9.72 => 1,009,072
1010
1111 bus = [
1212 isDebug : false ,
Original file line number Diff line number Diff line change @@ -15,5 +15,5 @@ dependencies {
1515 api dep. free_proguard
1616 api ' com.r0adkll:slidableactivity:2.0.5'
1717 compileOnly dep. leakcanary. android_no_op
18- // api 'com.blankj:utilcode:1.22.6 '
18+ // api 'com.blankj:utilcode:1.22.7 '
1919}
Original file line number Diff line number Diff line change 22
33Gradle:
44``` groovy
5- implementation 'com.blankj:utilcode:1.22.6 '
5+ implementation 'com.blankj:utilcode:1.22.7 '
66```
77
88
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ apply plugin: "com.blankj.bus"
2727给 base 模块添加 [ AndroidUtilCode] ( https://github.com/Blankj/AndroidUtilCode ) 依赖:
2828
2929``` groovy
30- api "com.blankj:utilcode:1.22.6 "
30+ api "com.blankj:utilcode:1.22.7 "
3131```
3232
3333比如 module0 中存在的 ` Module0Activity.java ` ,我们通常都是在它内部写一个 ` start ` 函数来启动它,现在我们给它添加 ` @BusUtils.Subscribe ` 注解,并给注解的 ` name ` 赋唯一值,要注意,函数务必要 ` public static ` 哦:
Original file line number Diff line number Diff line change 22
33Gradle:
44``` groovy
5- implementation 'com.blankj:utilcode:1.22.6 '
5+ implementation 'com.blankj:utilcode:1.22.7 '
66```
77
88
Original file line number Diff line number Diff line change 1212import java .lang .reflect .Field ;
1313import java .lang .reflect .InvocationTargetException ;
1414import java .util .HashSet ;
15+ import java .util .Iterator ;
1516import java .util .LinkedList ;
1617import java .util .List ;
1718import java .util .Map ;
@@ -286,14 +287,16 @@ private void setTopActivity(final Activity activity) {
286287 }
287288
288289 private void consumeOnActivityDestroyedListener (Activity activity ) {
289- Set <Map .Entry <Activity , Set <OnActivityDestroyedListener >>> entries = mDestroyedListenerMap .entrySet ();
290- for (Map .Entry <Activity , Set <OnActivityDestroyedListener >> entry : entries ) {
290+ Iterator <Map .Entry <Activity , Set <OnActivityDestroyedListener >>> iterator
291+ = mDestroyedListenerMap .entrySet ().iterator ();
292+ while (iterator .hasNext ()) {
293+ Map .Entry <Activity , Set <OnActivityDestroyedListener >> entry = iterator .next ();
291294 if (entry .getKey () == activity ) {
292295 Set <OnActivityDestroyedListener > value = entry .getValue ();
293296 for (OnActivityDestroyedListener listener : value ) {
294297 listener .onActivityDestroyed (activity );
295298 }
296- removeOnActivityDestroyedListener ( activity );
299+ iterator . remove ( );
297300 }
298301 }
299302 }
You can’t perform that action at this time.
0 commit comments