Fix AOSP build

This commit is contained in:
Torsten Grote 2024-05-30 16:02:14 -03:00
parent 4b1c76d585
commit f68fa0f3fc
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF

View file

@ -53,7 +53,8 @@ internal class IconManager(
zip.setLevel(BEST_SPEED) zip.setLevel(BEST_SPEED)
val entries = mutableSetOf<String>() val entries = mutableSetOf<String>()
packageService.allUserPackages.forEach { packageService.allUserPackages.forEach {
val drawable = packageManager.getApplicationIcon(it.applicationInfo) val applicationInfo = it.applicationInfo ?: return@forEach
val drawable = packageManager.getApplicationIcon(applicationInfo)
if (packageManager.isDefaultApplicationIcon(drawable)) return@forEach if (packageManager.isDefaultApplicationIcon(drawable)) return@forEach
val entry = ZipEntry(it.packageName) val entry = ZipEntry(it.packageName)
zip.putNextEntry(entry) zip.putNextEntry(entry)