Upgrade gradle (#1866)

This commit is contained in:
LoveSy
2024-07-08 22:49:18 +08:00
committed by GitHub
parent 25a21f4b5f
commit 0106628da1
8 changed files with 24 additions and 21 deletions

View File

@@ -416,8 +416,8 @@ private fun InfoCard() {
}
fun getManagerVersion(context: Context): Pair<String, Int> {
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)
return Pair(packageInfo.versionName, packageInfo.versionCode)
val packageInfo = context.packageManager.getPackageInfo(context.packageName, 0)!!
return Pair(packageInfo.versionName!!, packageInfo.versionCode)
}
@Preview

View File

@@ -45,7 +45,7 @@ class SuperUserViewModel : ViewModel() {
val packageName: String
get() = packageInfo.packageName
val uid: Int
get() = packageInfo.applicationInfo.uid
get() = packageInfo.applicationInfo!!.uid
val allowSu: Boolean
get() = profile != null && profile.allowSu
@@ -90,7 +90,7 @@ class SuperUserViewModel : ViewModel() {
.toPinyinString(it.label).contains(search, true)
}.filter {
it.uid == 2000 // Always show shell
|| showSystemApps || it.packageInfo.applicationInfo.flags.and(ApplicationInfo.FLAG_SYSTEM) == 0
|| showSystemApps || it.packageInfo.applicationInfo!!.flags.and(ApplicationInfo.FLAG_SYSTEM) == 0
}
}
@@ -146,7 +146,7 @@ class SuperUserViewModel : ViewModel() {
apps = packages.map {
val appInfo = it.applicationInfo
val uid = appInfo.uid
val uid = appInfo!!.uid
val profile = Natives.getAppProfile(it.packageName, uid)
AppInfo(
label = appInfo.loadLabel(pm).toString(),