diff --git a/README.md b/README.md index 86f21f8..7337e96 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ * 项目地址:[Github](https://github.com/getActivity/Logcat) -* 可以扫码下载 Demo 进行演示或者测试,如果扫码下载不了的,[点击此处可直接下载](https://github.com/getActivity/Logcat/releases/download/11.0/Logcat.apk) +* 可以扫码下载 Demo 进行演示或者测试,如果扫码下载不了的,[点击此处可直接下载](https://github.com/getActivity/Logcat/releases/download/11.2/Logcat.apk) ![](picture/demo_code.png) @@ -51,7 +51,7 @@ dependencyResolutionManagement { ```groovy dependencies { // 日志调试框架:https://github.com/getActivity/Logcat - debugImplementation 'com.github.getActivity:Logcat:11.0' + debugImplementation 'com.github.getActivity:Logcat:11.2' } ``` diff --git a/app/build.gradle b/app/build.gradle index edfb57f..6c98499 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -7,8 +7,8 @@ android { applicationId "com.hjq.logcat.demo" minSdkVersion 16 targetSdkVersion 31 - versionCode 1100 - versionName "11.0" + versionCode 1120 + versionName "11.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } @@ -65,8 +65,8 @@ dependencies { implementation 'com.github.getActivity:TitleBar:9.6' // 吐司框架:https://github.com/getActivity/ToastUtils - implementation 'com.github.getActivity:ToastUtils:10.5' + implementation 'com.github.getActivity:ToastUtils:11.2' // 内存泄漏捕捉:https://github.com/square/leakcanary - debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1' + debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.10' } \ No newline at end of file diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 54fc63e..99b5c74 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -35,11 +35,6 @@ android:name="LogcatNotifyEntrance" android:value="true" /> - - - diff --git a/library/build.gradle b/library/build.gradle index 8e88165..3ea7021 100644 --- a/library/build.gradle +++ b/library/build.gradle @@ -9,8 +9,8 @@ android { defaultConfig { minSdkVersion 16 - versionCode 1100 - versionName "11.0" + versionCode 1120 + versionName "11.2" } lintOptions { diff --git a/library/src/main/java/com/hjq/logcat/LogcatProvider.java b/library/src/main/java/com/hjq/logcat/LogcatProvider.java index 79d75de..e919418 100644 --- a/library/src/main/java/com/hjq/logcat/LogcatProvider.java +++ b/library/src/main/java/com/hjq/logcat/LogcatProvider.java @@ -21,6 +21,9 @@ public final class LogcatProvider extends ContentProvider { public boolean onCreate() { Context context = getContext(); if (context != null) { + // 初始化 Logcat 配置项 + LogcatConfig.init(context.getApplicationContext()); + Boolean notifyEntrance = LogcatUtils.getMetaBooleanData( context, LogcatContract.META_DATA_LOGCAT_NOTIFY_ENTRANCE); Boolean windowEntrance = LogcatUtils.getMetaBooleanData( @@ -34,8 +37,6 @@ public boolean onCreate() { } if (notifyEntrance != null && notifyEntrance) { - LogcatConfig.init(context.getApplicationContext()); - if (context instanceof Application) { ForegroundServiceStartTask.with((Application) context); }