Skip to content

Commit

Permalink
修复大写搜索关键字无法搜索到的问题
Browse files Browse the repository at this point in the history
修复部分三星手机通知栏无法显示的问题
  • Loading branch information
getActivity committed Aug 5, 2023
1 parent 2f2cfba commit cb60c13
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

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

![](picture/demo_code.png)

Expand Down Expand Up @@ -51,7 +51,7 @@ dependencyResolutionManagement {
```groovy
dependencies {
// 日志调试框架:https://github.com/getActivity/Logcat
debugImplementation 'com.github.getActivity:Logcat:11.3'
debugImplementation 'com.github.getActivity:Logcat:11.5'
}
```

Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.hjq.logcat.demo"
minSdkVersion 16
targetSdkVersion 33
versionCode 1130
versionName "11.3"
versionCode 1150
versionName "11.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}

Expand Down
4 changes: 2 additions & 2 deletions library/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ android {

defaultConfig {
minSdkVersion 16
versionCode 1130
versionName "11.3"
versionCode 1150
versionName "11.5"
}

lintOptions {
Expand Down
2 changes: 1 addition & 1 deletion library/src/main/java/com/hjq/logcat/LogcatAdapter.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ private void filterData() {
}

private boolean isConform(LogcatInfo info) {
return (TextUtils.isEmpty(mKeyword) || info.toString(mContext).toLowerCase().contains(mKeyword)) &&
return (TextUtils.isEmpty(mKeyword) || info.toString(mContext).toLowerCase().contains(mKeyword.toLowerCase())) &&
(LogLevel.VERBOSE.equals(mLogLevel) || info.getLevel().equals(mLogLevel));
}

Expand Down
5 changes: 3 additions & 2 deletions library/src/main/java/com/hjq/logcat/LogcatService.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ public IBinder onBind(Intent intent) {
public int onStartCommand(Intent intent, int flags, int startId) {
Intent notificationIntent = new Intent(this, LogcatActivity.class);
int pendingIntentFlag;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S &&
getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.S) {
// Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
// Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g.
// if it needs to be used with inline replies or bubbles.
pendingIntentFlag = PendingIntent.FLAG_MUTABLE;
pendingIntentFlag = PendingIntent.FLAG_IMMUTABLE;
} else {
pendingIntentFlag = PendingIntent.FLAG_UPDATE_CURRENT;
}
Expand Down

0 comments on commit cb60c13

Please sign in to comment.