From 1808a246b4b3eba28409cf31516e257b4ab39a55 Mon Sep 17 00:00:00 2001 From: ACh Sulfate Date: Sat, 23 Nov 2024 22:35:22 +0800 Subject: [PATCH] fix: nullability issue due to sdk change --- app/src/main/java/io/github/qauxv/util/HostInfo.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/io/github/qauxv/util/HostInfo.kt b/app/src/main/java/io/github/qauxv/util/HostInfo.kt index c07c563f97..cb1bb1610a 100644 --- a/app/src/main/java/io/github/qauxv/util/HostInfo.kt +++ b/app/src/main/java/io/github/qauxv/util/HostInfo.kt @@ -49,10 +49,10 @@ fun init(applicationContext: Application) { applicationContext.applicationInfo.loadLabel(applicationContext.packageManager).toString(), PackageInfoCompat.getLongVersionCode(packageInfo), PackageInfoCompat.getLongVersionCode(packageInfo).toInt(), - packageInfo.versionName, + packageInfo.versionName ?: "", when (packageName) { PACKAGE_NAME_QQ -> { - if ("GoogleMarket" in (packageInfo.applicationInfo.metaData["AppSetting_params"] + if ("GoogleMarket" in (packageInfo.applicationInfo!!.metaData["AppSetting_params"] ?: "") as String) { HostSpecies.QQ_Play } else HostSpecies.QQ