From 81341d32f94467f85b2723fe3d8e69358704c028 Mon Sep 17 00:00:00 2001 From: Blankj <625783482@qq.com> Date: Mon, 17 Dec 2018 14:24:29 +0800 Subject: [PATCH] see 12/17 log --- CHANGELOG.md | 1 + README-CN.md | 2 +- README.md | 2 +- config.gradle | 4 ++-- lib/base/build.gradle | 4 ++-- utilcode/README-CN.md | 2 +- utilcode/README-STATIC-BUS.md | 2 +- utilcode/README.md | 2 +- utilcode/lib/src/main/AndroidManifest.xml | 20 +++++++++---------- .../com/blankj/utilcode/util/BusUtils.java | 5 ++++- .../java/com/blankj/utilcode/util/Utils.java | 17 ++++++++-------- 11 files changed, 33 insertions(+), 28 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 10fef262..11e1e894 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +* `18/12/17` [fix] Utils$FileProvider4UtilCode not found. Publish v1.22.3. * `18/12/17` [fix] ToastUtils leak. Publish v1.22.2. * `18/12/09` [add] Component for the project. * `18/12/04` [add] BusUtils. Publish v1.22.1. diff --git a/README-CN.md b/README-CN.md index eda11173..a834ea3c 100644 --- a/README-CN.md +++ b/README-CN.md @@ -41,7 +41,7 @@ [logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png -[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.2-brightgreen.svg +[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.3-brightgreen.svg [auc]: https://github.com/Blankj/AndroidUtilCode [apiSvg]: https://img.shields.io/badge/API-14+-brightgreen.svg diff --git a/README.md b/README.md index 435d8771..43c6c843 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ If this project helps you a lot and you want to support the project's developmen [logo]: https://raw.githubusercontent.com/Blankj/AndroidUtilCode/master/art/logo.png -[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.2-brightgreen.svg +[aucSvg]: https://img.shields.io/badge/AndroidUtilCode-v1.22.3-brightgreen.svg [auc]: https://github.com/Blankj/AndroidUtilCode [apiSvg]: https://img.shields.io/badge/API-14+-brightgreen.svg diff --git a/config.gradle b/config.gradle index adf27461..dacf0c96 100644 --- a/config.gradle +++ b/config.gradle @@ -5,8 +5,8 @@ ext { compileSdkVersion = 27 minSdkVersion = 14 targetSdkVersion = 27 - versionCode = 1_022_002 - versionName = '1.22.2'// E.g. 1.9.72 => 1,009,072 + versionCode = 1_022_003 + versionName = '1.22.3'// E.g. 1.9.72 => 1,009,072 bus = [ isDebug: false, diff --git a/lib/base/build.gradle b/lib/base/build.gradle index b32b54d4..8fd395b7 100644 --- a/lib/base/build.gradle +++ b/lib/base/build.gradle @@ -4,7 +4,7 @@ apply { dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') -// api project(':utilcode-lib') + api project(':utilcode-lib') api project(':subutil-lib') api dep.support.appcompat_v7 @@ -15,5 +15,5 @@ dependencies { api dep.free_proguard api 'com.r0adkll:slidableactivity:2.0.5' compileOnly dep.leakcanary.android_no_op - api 'com.blankj:utilcode:1.22.2' +// api 'com.blankj:utilcode:1.22.3' } \ No newline at end of file diff --git a/utilcode/README-CN.md b/utilcode/README-CN.md index c9ad8eb7..2786cd19 100644 --- a/utilcode/README-CN.md +++ b/utilcode/README-CN.md @@ -2,7 +2,7 @@ Gradle: ```groovy -implementation 'com.blankj:utilcode:1.22.2' +implementation 'com.blankj:utilcode:1.22.3' ``` diff --git a/utilcode/README-STATIC-BUS.md b/utilcode/README-STATIC-BUS.md index 2f0a8f3e..5fc234c2 100644 --- a/utilcode/README-STATIC-BUS.md +++ b/utilcode/README-STATIC-BUS.md @@ -27,7 +27,7 @@ apply plugin: "com.blankj.bus" 给 base 模块添加 [AndroidUtilCode](https://github.com/Blankj/AndroidUtilCode) 依赖: ```groovy -api "com.blankj:utilcode:1.22.2" +api "com.blankj:utilcode:1.22.3" ``` 比如 module0 中存在的 `Module0Activity.java`,我们通常都是在它内部写一个 `start` 函数来启动它,现在我们给它添加 `@BusUtils.Subscribe` 注解,并给注解的 `name` 赋唯一值,要注意,函数务必要 `public static` 哦: diff --git a/utilcode/README.md b/utilcode/README.md index a04f3b06..ff938b70 100644 --- a/utilcode/README.md +++ b/utilcode/README.md @@ -2,7 +2,7 @@ Gradle: ```groovy -implementation 'com.blankj:utilcode:1.22.2' +implementation 'com.blankj:utilcode:1.22.3' ``` diff --git a/utilcode/lib/src/main/AndroidManifest.xml b/utilcode/lib/src/main/AndroidManifest.xml index c43c464d..f2d3c8eb 100644 --- a/utilcode/lib/src/main/AndroidManifest.xml +++ b/utilcode/lib/src/main/AndroidManifest.xml @@ -9,15 +9,15 @@ android:theme="@style/ActivityTranslucent" android:windowSoftInputMode="stateHidden|stateAlwaysHidden" /> - - - - - - - - - - + + + \ No newline at end of file diff --git a/utilcode/lib/src/main/java/com/blankj/utilcode/util/BusUtils.java b/utilcode/lib/src/main/java/com/blankj/utilcode/util/BusUtils.java index c6afaa15..877fc487 100644 --- a/utilcode/lib/src/main/java/com/blankj/utilcode/util/BusUtils.java +++ b/utilcode/lib/src/main/java/com/blankj/utilcode/util/BusUtils.java @@ -7,6 +7,8 @@ import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; /** *
@@ -20,7 +22,8 @@ import java.lang.annotation.Target;
  */
 public final class BusUtils {
 
-    private static final Object NULL = new Object();
+    private static final Object              NULL  = new Object();
+    private static final Map BUSES = new ConcurrentHashMap<>();
 
     public static  T post(String name, Object... objects) {
         if (name == null || name.length() == 0) return null;
diff --git a/utilcode/lib/src/main/java/com/blankj/utilcode/util/Utils.java b/utilcode/lib/src/main/java/com/blankj/utilcode/util/Utils.java
index 518bf267..c041c8b3 100644
--- a/utilcode/lib/src/main/java/com/blankj/utilcode/util/Utils.java
+++ b/utilcode/lib/src/main/java/com/blankj/utilcode/util/Utils.java
@@ -7,6 +7,7 @@ import android.app.Application;
 import android.app.Application.ActivityLifecycleCallbacks;
 import android.content.Context;
 import android.os.Bundle;
+import android.support.v4.content.FileProvider;
 
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
@@ -331,14 +332,14 @@ public final class Utils {
         }
     }
 
-//    public static final class FileProvider4UtilCode extends FileProvider {
-//
-//        @Override
-//        public boolean onCreate() {
-//            Utils.init(getContext());
-//            return true;
-//        }
-//    }
+    public static final class FileProvider4UtilCode extends FileProvider {
+
+        @Override
+        public boolean onCreate() {
+            Utils.init(getContext());
+            return true;
+        }
+    }
 
     ///////////////////////////////////////////////////////////////////////////
     // interface
-- 
GitLab