From 0facd0bcbf450dceaafc6ad06a197505f7fca6a6 Mon Sep 17 00:00:00 2001 From: fankesyooni Date: Sun, 10 Nov 2024 21:42:06 +0800 Subject: [PATCH] chore: update target sdk to 35 --- gradle.properties | 2 +- .../fankes/apperrorstracking/hook/entity/FrameworkHooker.kt | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8507e7b..fcd1be4 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ kotlin.incremental.useClasspathSnapshot=true project.name=AppErrorsTracking project.android.compileSdk=35 project.android.minSdk=24 -project.android.targetSdk=34 +project.android.targetSdk=35 project.android.ndk.version="24.0.8215888" project.android.cmake.version="3.22.1" project.module-app.packageName=com.fankes.apperrorstracking diff --git a/module-app/src/main/java/com/fankes/apperrorstracking/hook/entity/FrameworkHooker.kt b/module-app/src/main/java/com/fankes/apperrorstracking/hook/entity/FrameworkHooker.kt index d3042a1..744b266 100644 --- a/module-app/src/main/java/com/fankes/apperrorstracking/hook/entity/FrameworkHooker.kt +++ b/module-app/src/main/java/com/fankes/apperrorstracking/hook/entity/FrameworkHooker.kt @@ -263,7 +263,9 @@ object FrameworkHooker : YukiBaseHooker() { * 是否为系统应用 * @return [Boolean] */ - fun PackageInfo.isSystemApp() = (applicationInfo.flags and ApplicationInfo.FLAG_SYSTEM) != 0 + fun PackageInfo.isSystemApp() = applicationInfo?.let { + (it.flags and ApplicationInfo.FLAG_SYSTEM) != 0 + } ?: false when (filters.type) { AppFiltersType.USER -> result.filter { it.isSystemApp().not() } AppFiltersType.SYSTEM -> result.filter { it.isSystemApp() }