mirror of
https://github.com/KitsunePie/AppErrorsTracking.git
synced 2025-09-01 08:45:16 +08:00
Modify change appNameOf function returned default blank content to "unknown" in FunctionFactory
This commit is contained in:
@@ -136,7 +136,7 @@ fun Context.listOfPackages() = runCatching {
|
||||
* @return [String]
|
||||
*/
|
||||
fun Context.appNameOf(packageName: String = getPackageName()) =
|
||||
getPackageInfoCompat(packageName)?.applicationInfo?.loadLabel(packageManager)?.toString() ?: ""
|
||||
getPackageInfoCompat(packageName)?.applicationInfo?.loadLabel(packageManager)?.toString() ?: "unknown"
|
||||
|
||||
/**
|
||||
* 得到 APP 版本信息与版本号
|
||||
|
Reference in New Issue
Block a user