Bump compile sdk to 35

Co-authored-by: p
This commit is contained in:
AntsyLich 2024-10-12 05:11:58 +06:00
parent 481cfedf08
commit 37419cdc26
No known key found for this signature in database
5 changed files with 8 additions and 8 deletions

View file

@ -127,7 +127,7 @@ private fun Extension.getIcon(density: Int = DisplayMetrics.DENSITY_DEFAULT): St
return produceState<Result<ImageBitmap>>(initialValue = Result.Loading, this) {
withIOContext {
value = try {
val appInfo = ExtensionLoader.getExtensionPackageInfoFromPkgName(context, pkgName)!!.applicationInfo
val appInfo = ExtensionLoader.getExtensionPackageInfoFromPkgName(context, pkgName)!!.applicationInfo!!
val appResources = context.packageManager.getResourcesForApplication(appInfo)
Result.Success(
appResources.getDrawableForDensity(appInfo.icon, density, null)!!

View file

@ -87,7 +87,7 @@ class ExtensionManager(
?: return null
return iconMap[pkgName] ?: iconMap.getOrPut(pkgName) {
ExtensionLoader.getExtensionPackageInfoFromPkgName(context, pkgName)!!.applicationInfo
ExtensionLoader.getExtensionPackageInfoFromPkgName(context, pkgName)!!.applicationInfo!!
.loadIcon(context.packageManager)
}
}

View file

@ -140,7 +140,7 @@ internal object ExtensionLoader {
val path = it.absolutePath
pkgManager.getPackageArchiveInfo(path, PACKAGE_FLAGS)
?.apply { applicationInfo.fixBasePaths(path) }
?.apply { applicationInfo!!.fixBasePaths(path) }
}
?.filter { isPackageAnExtension(it) }
?.map { ExtensionInfo(packageInfo = it, isShared = false) }
@ -191,7 +191,7 @@ internal object ExtensionLoader {
context.packageManager.getPackageArchiveInfo(privateExtensionFile.absolutePath, PACKAGE_FLAGS)
?.takeIf { isPackageAnExtension(it) }
?.let {
it.applicationInfo.fixBasePaths(privateExtensionFile.absolutePath)
it.applicationInfo!!.fixBasePaths(privateExtensionFile.absolutePath)
ExtensionInfo(
packageInfo = it,
isShared = false,
@ -226,7 +226,7 @@ internal object ExtensionLoader {
private suspend fun loadExtension(context: Context, extensionInfo: ExtensionInfo): LoadResult {
val pkgManager = context.packageManager
val pkgInfo = extensionInfo.packageInfo
val appInfo = pkgInfo.applicationInfo
val appInfo = pkgInfo.applicationInfo!!
val pkgName = pkgInfo.packageName
val extName = pkgManager.getApplicationLabel(appInfo).toString().substringAfter("Tachiyomi: ")
@ -365,7 +365,7 @@ internal object ExtensionLoader {
*/
private fun getSignatures(pkgInfo: PackageInfo): List<String>? {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
val signingInfo = pkgInfo.signingInfo
val signingInfo = pkgInfo.signingInfo!!
if (signingInfo.hasMultipleSigners()) {
signingInfo.apkContentsSigners
} else {

View file

@ -4,7 +4,7 @@ import org.gradle.api.JavaVersion as GradleJavaVersion
import org.jetbrains.kotlin.gradle.dsl.JvmTarget as KotlinJvmTarget
object AndroidConfig {
const val COMPILE_SDK = 34
const val COMPILE_SDK = 35
const val TARGET_SDK = 34
const val MIN_SDK = 26
const val NDK = "27.1.12297006"

View file

@ -36,7 +36,7 @@ object WebViewUtil {
fun getVersion(context: Context): String {
val webView = WebView.getCurrentWebViewPackage() ?: return "how did you get here?"
val pm = context.packageManager
val label = webView.applicationInfo.loadLabel(pm)
val label = webView.applicationInfo!!.loadLabel(pm)
val version = webView.versionName
return "$label $version"
}