diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2ab3c855..947a260f 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -agp = "8.6.1" +agp = "8.7.0" kotlin = "2.0.20" rxhttp = "3.3.0" hidden-api = "4.3.3" @@ -11,14 +11,14 @@ kotlin = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" } ksp = { id = "com.google.devtools.ksp", version = "2.0.20-1.0.25" } gms = { id = "com.google.gms.google-services", version = "4.4.2" } -nav-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotlin", version = "2.8.1" } +nav-safeargs-kotlin = { id = "androidx.navigation.safeargs.kotlin", version = "2.8.2" } autoresconfig = { id = "dev.rikka.tools.autoresconfig", version = "1.2.2" } -materialthemebuilder = { id = "dev.rikka.tools.materialthemebuilder", version = "1.3.3" } -refine = { id = "dev.rikka.tools.refine", version = "4.3.0" } +materialthemebuilder = { id = "dev.rikka.tools.materialthemebuilder", version = "1.4.1" } +refine = { id = "dev.rikka.tools.refine", version = "4.4.0" } [libraries] -androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version = "2.8.1" } -androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version = "2.8.1" } +androidx-navigation-fragment-ktx = { module = "androidx.navigation:navigation-fragment-ktx", version = "2.8.2" } +androidx-navigation-ui-ktx = { module = "androidx.navigation:navigation-ui-ktx", version = "2.8.2" } androidx-preference-ktx = { module = "androidx.preference:preference-ktx", version = "1.2.1" } androidx-swiperefreshlayout = { module = "androidx.swiperefreshlayout:swiperefreshlayout", version = "1.1.0" } com-android-tools-build-apksig = { module = "com.android.tools.build:apksig", version.ref = "agp" } @@ -32,7 +32,7 @@ com-github-liujingxing-rxhttp-converter-serialization = { module = "com.github.l com-github-topjohnwu-libsu-core = { module = "com.github.topjohnwu.libsu:core", version = "6.0.0" } com-google-android-material = { module = "com.google.android.material:material", version = "1.12.0" } com-google-android-gms-play-services-ads = { module = "com.google.android.gms:play-services-ads", version = "23.4.0" } -com-google-firebase-bom = { module = "com.google.firebase:firebase-bom", version = "33.3.0" } +com-google-firebase-bom = { module = "com.google.firebase:firebase-bom", version = "33.4.0" } com-google-firebase-analytics-ktx = { module = "com.google.firebase:firebase-analytics-ktx" } com-squareup-okhttp3 = { module = "com.squareup.okhttp3:okhttp", version = "4.12.0" } de-robv-android-xposed-api = { module = "de.robv.android.xposed:api", version = "82" } diff --git a/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/HMAService.kt b/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/HMAService.kt index 88996c5b..90ed606a 100644 --- a/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/HMAService.kt +++ b/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/HMAService.kt @@ -129,7 +129,7 @@ class HMAService(val pms: IPackageManager) : IHMAService.Stub() { if (caller == null || query == null) return false if (caller in Constants.packagesShouldNotHide || query in Constants.packagesShouldNotHide) return false if ((caller == Constants.GMS_PACKAGE_NAME || caller == Constants.GSF_PACKAGE_NAME) && query == Constants.APP_PACKAGE_NAME) return false // If apply hide on gms, hma app will crash 😓 - if (caller in query) return false + if (caller == query) return false val appConfig = config.scope[caller] ?: return false if (appConfig.useWhitelist && appConfig.excludeSystemApps && query in systemApps) return false diff --git a/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/Utils.kt b/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/Utils.kt index 7c65b14e..3a3e12cb 100644 --- a/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/Utils.kt +++ b/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/Utils.kt @@ -54,10 +54,13 @@ object Utils { return result } - fun getPackageNameFromPackageSettings(packageSettings: Any): String { - return with(packageSettings.toString()) { - substring(lastIndexOf(' ') + 1, lastIndexOf('/')) - } + fun getPackageNameFromPackageSettings(packageSettings: Any): String? { + return runCatching { + val fieldName = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) "mName" else "name" + val field = packageSettings::class.java.getDeclaredField(fieldName) + field.isAccessible = true + field.get(packageSettings) as? String + }.getOrNull() } fun getInstalledApplicationsCompat(pms: IPackageManager, flags: Long, userId: Int): List { diff --git a/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/hook/FrameworkCompatHook.kt b/xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/hook/PlatformCompatHook.kt similarity index 100% rename from xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/hook/FrameworkCompatHook.kt rename to xposed/src/main/java/icu/nullptr/hidemyapplist/xposed/hook/PlatformCompatHook.kt