labelFor

fun labelFor(packageName: String, appInfo: ApplicationInfo? = null): String?

The display name of packageName, or null when it can't be resolved. Pass appInfo when the caller already has it (a notification carries its app's): that works even when Android 11+ package visibility hides the app from getApplicationInfo.