what-the-bank/sources/com/huawei/hms/framework/common/PackageUtils.java

22 lines
611 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.huawei.hms.framework.common;
import android.content.Context;
import android.content.pm.PackageManager;
/* loaded from: classes2.dex */
public class PackageUtils {
private static final String TAG = "PackageUtils";
public static String getVersionName(Context context) {
if (context == null) {
return "";
}
try {
return context.getPackageManager().getPackageInfo(context.getPackageName(), 16384).versionName;
} catch (PackageManager.NameNotFoundException e) {
Logger.w(TAG, "", e);
return "";
}
}
}