File tree 11 files changed +33
-28
lines changed
java/com/blankj/utilcode/util
11 files changed +33
-28
lines changed Original file line number Diff line number Diff line change
1
+ * ` 18/12/17 ` [ fix] Utils$FileProvider4UtilCode not found. Publish v1.22.3.
1
2
* ` 18/12/17 ` [ fix] ToastUtils leak. Publish v1.22.2.
2
3
* ` 18/12/09 ` [ add] Component for the project.
3
4
* ` 18/12/04 ` [ add] BusUtils. Publish v1.22.1.
Original file line number Diff line number Diff line change 41
41
42
42
[ logo ] : https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
43
43
44
- [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.2 -brightgreen.svg
44
+ [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.3 -brightgreen.svg
45
45
[ auc ] : https://github.com/Blankj/AndroidUtilCode
46
46
47
47
[ 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
41
41
42
42
[ logo ] : https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png
43
43
44
- [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.2 -brightgreen.svg
44
+ [ aucSvg ] : https://img.shields.io/badge/AndroidUtilCode-v1.22.3 -brightgreen.svg
45
45
[ auc ] : https://github.com/Blankj/AndroidUtilCode
46
46
47
47
[ apiSvg ] : https://img.shields.io/badge/API-14+-brightgreen.svg
Original file line number Diff line number Diff line change 5
5
compileSdkVersion = 27
6
6
minSdkVersion = 14
7
7
targetSdkVersion = 27
8
- versionCode = 1_022_002
9
- versionName = ' 1.22.2 ' // E.g. 1.9.72 => 1,009,072
8
+ versionCode = 1_022_003
9
+ versionName = ' 1.22.3 ' // E.g. 1.9.72 => 1,009,072
10
10
11
11
bus = [
12
12
isDebug : false ,
Original file line number Diff line number Diff line change 4
4
5
5
dependencies {
6
6
implementation fileTree(include : [' *.jar' ], dir : ' libs' )
7
- // api project(':utilcode-lib')
7
+ api project(' :utilcode-lib' )
8
8
api project(' :subutil-lib' )
9
9
10
10
api dep. support. appcompat_v7
@@ -15,5 +15,5 @@ dependencies {
15
15
api dep. free_proguard
16
16
api ' com.r0adkll:slidableactivity:2.0.5'
17
17
compileOnly dep. leakcanary. android_no_op
18
- api ' com.blankj:utilcode:1.22.2 '
18
+ // api 'com.blankj:utilcode:1.22.3 '
19
19
}
Original file line number Diff line number Diff line change 2
2
3
3
Gradle:
4
4
``` groovy
5
- implementation 'com.blankj:utilcode:1.22.2 '
5
+ implementation 'com.blankj:utilcode:1.22.3 '
6
6
```
7
7
8
8
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ apply plugin: "com.blankj.bus"
27
27
给 base 模块添加 [ AndroidUtilCode] ( https://github.com/Blankj/AndroidUtilCode ) 依赖:
28
28
29
29
``` groovy
30
- api "com.blankj:utilcode:1.22.2 "
30
+ api "com.blankj:utilcode:1.22.3 "
31
31
```
32
32
33
33
比如 module0 中存在的 ` Module0Activity.java ` ,我们通常都是在它内部写一个 ` start ` 函数来启动它,现在我们给它添加 ` @BusUtils.Subscribe ` 注解,并给注解的 ` name ` 赋唯一值,要注意,函数务必要 ` public static ` 哦:
Original file line number Diff line number Diff line change 2
2
3
3
Gradle:
4
4
``` groovy
5
- implementation 'com.blankj:utilcode:1.22.2 '
5
+ implementation 'com.blankj:utilcode:1.22.3 '
6
6
```
7
7
8
8
Original file line number Diff line number Diff line change 9
9
android : theme =" @style/ActivityTranslucent"
10
10
android : windowSoftInputMode =" stateHidden|stateAlwaysHidden" />
11
11
12
- <!-- < provider-->
13
- <!-- android:name=".util.Utils$FileProvider4UtilCode"-->
14
- <!-- android:authorities="${applicationId}.utilcode.provider"-->
15
- <!-- android:exported="false"-->
16
- <!-- android:grantUriPermissions="true"-->
17
- <!-- android:multiprocess="true"> -- >
18
- <!-- < meta-data-->
19
- <!-- android:name="android.support.FILE_PROVIDER_PATHS"-->
20
- <!-- android:resource="@xml/util_code_provider_paths" /> -- >
21
- <!-- < /provider> -- >
12
+ <provider
13
+ android : name =" .util.Utils$FileProvider4UtilCode"
14
+ android : authorities =" ${applicationId}.utilcode.provider"
15
+ android : exported =" false"
16
+ android : grantUriPermissions =" true"
17
+ android : multiprocess =" true" >
18
+ <meta-data
19
+ android : name =" android.support.FILE_PROVIDER_PATHS"
20
+ android : resource =" @xml/util_code_provider_paths" />
21
+ </provider >
22
22
</application >
23
23
</manifest >
Original file line number Diff line number Diff line change 7
7
import java .lang .annotation .Retention ;
8
8
import java .lang .annotation .RetentionPolicy ;
9
9
import java .lang .annotation .Target ;
10
+ import java .util .Map ;
11
+ import java .util .concurrent .ConcurrentHashMap ;
10
12
11
13
/**
12
14
* <pre>
20
22
*/
21
23
public final class BusUtils {
22
24
23
- private static final Object NULL = new Object ();
25
+ private static final Object NULL = new Object ();
26
+ private static final Map <Object , String > BUSES = new ConcurrentHashMap <>();
24
27
25
28
public static <T > T post (String name , Object ... objects ) {
26
29
if (name == null || name .length () == 0 ) return null ;
Original file line number Diff line number Diff line change 7
7
import android .app .Application .ActivityLifecycleCallbacks ;
8
8
import android .content .Context ;
9
9
import android .os .Bundle ;
10
+ import android .support .v4 .content .FileProvider ;
10
11
11
12
import java .lang .reflect .Field ;
12
13
import java .lang .reflect .InvocationTargetException ;
@@ -331,14 +332,14 @@ private Activity getTopActivityByReflect() {
331
332
}
332
333
}
333
334
334
- // public static final class FileProvider4UtilCode extends FileProvider {
335
- //
336
- // @Override
337
- // public boolean onCreate() {
338
- // Utils.init(getContext());
339
- // return true;
340
- // }
341
- // }
335
+ public static final class FileProvider4UtilCode extends FileProvider {
336
+
337
+ @ Override
338
+ public boolean onCreate () {
339
+ Utils .init (getContext ());
340
+ return true ;
341
+ }
342
+ }
342
343
343
344
///////////////////////////////////////////////////////////////////////////
344
345
// interface
You can’t perform that action at this time.
0 commit comments