Skip to content

Commit cb60c13

Browse files
committed
修复大写搜索关键字无法搜索到的问题
修复部分三星手机通知栏无法显示的问题
1 parent 2f2cfba commit cb60c13

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* 项目地址:[Github](https://github.com/getActivity/Logcat)
66

7-
* 可以扫码下载 Demo 进行演示或者测试,如果扫码下载不了的,[点击此处可直接下载](https://github.com/getActivity/Logcat/releases/download/11.3/Logcat.apk)
7+
* 可以扫码下载 Demo 进行演示或者测试,如果扫码下载不了的,[点击此处可直接下载](https://github.com/getActivity/Logcat/releases/download/11.5/Logcat.apk)
88

99
![](picture/demo_code.png)
1010

@@ -51,7 +51,7 @@ dependencyResolutionManagement {
5151
```groovy
5252
dependencies {
5353
// 日志调试框架:https://github.com/getActivity/Logcat
54-
debugImplementation 'com.github.getActivity:Logcat:11.3'
54+
debugImplementation 'com.github.getActivity:Logcat:11.5'
5555
}
5656
```
5757

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ android {
77
applicationId "com.hjq.logcat.demo"
88
minSdkVersion 16
99
targetSdkVersion 33
10-
versionCode 1130
11-
versionName "11.3"
10+
versionCode 1150
11+
versionName "11.5"
1212
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
1313
}
1414

library/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ android {
99

1010
defaultConfig {
1111
minSdkVersion 16
12-
versionCode 1130
13-
versionName "11.3"
12+
versionCode 1150
13+
versionName "11.5"
1414
}
1515

1616
lintOptions {

library/src/main/java/com/hjq/logcat/LogcatAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ private void filterData() {
226226
}
227227

228228
private boolean isConform(LogcatInfo info) {
229-
return (TextUtils.isEmpty(mKeyword) || info.toString(mContext).toLowerCase().contains(mKeyword)) &&
229+
return (TextUtils.isEmpty(mKeyword) || info.toString(mContext).toLowerCase().contains(mKeyword.toLowerCase())) &&
230230
(LogLevel.VERBOSE.equals(mLogLevel) || info.getLevel().equals(mLogLevel));
231231
}
232232

library/src/main/java/com/hjq/logcat/LogcatService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ public IBinder onBind(Intent intent) {
3232
public int onStartCommand(Intent intent, int flags, int startId) {
3333
Intent notificationIntent = new Intent(this, LogcatActivity.class);
3434
int pendingIntentFlag;
35-
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
35+
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
36+
getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.S) {
3637
// Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
3738
// Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g.
3839
// if it needs to be used with inline replies or bubbles.
39-
pendingIntentFlag = PendingIntent.FLAG_MUTABLE;
40+
pendingIntentFlag = PendingIntent.FLAG_IMMUTABLE;
4041
} else {
4142
pendingIntentFlag = PendingIntent.FLAG_UPDATE_CURRENT;
4243
}

0 commit comments

Comments
 (0)