From cfc941583cf052f10104adcfefe4431fede9a5e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Android=20=E8=BD=AE=E5=AD=90=E5=93=A5?= Date: Wed, 21 Dec 2022 23:28:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=85=B3=E9=97=AD=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E5=85=A5=E5=8F=A3=E5=AF=BC=E8=87=B4=E7=A9=BA=E6=8C=87?= =?UTF-8?q?=E9=92=88=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++-- app/build.gradle | 8 ++++---- app/src/main/AndroidManifest.xml | 5 ----- library/build.gradle | 4 ++-- library/src/main/java/com/hjq/logcat/LogcatProvider.java | 5 +++-- 5 files changed, 11 insertions(+), 15 deletions(-) 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); }