Skip to content

Commit dd8e659

Browse files
committed
fix: applicationInfo is nullable since API 34
1 parent 8606c08 commit dd8e659

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/kotlin/com/aheaditec/freerasp/Extensions.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ internal fun SuspiciousAppInfo.toPigeon(context: Context): FlutterSuspiciousAppI
4545
private fun PackageInfo.toPigeon(context: Context): FlutterPackageInfo {
4646
return FlutterPackageInfo(
4747
packageName = packageName,
48-
appName = context.packageManager.getApplicationLabel(applicationInfo) as String,
48+
appName = applicationInfo?.let {
49+
context.packageManager.getApplicationLabel(it) as String
50+
},
4951
version = getVersionString(),
5052
appIcon = Utils.parseIconBase64(context, packageName),
5153
installationSource = Utils.getInstallerPackageName(context, packageName),

0 commit comments

Comments
 (0)