Merge remote-tracking branch 'origin/release' into dev

# Conflicts:
#	app/src/main/java/com/gh/gamecenter/mygame/PlayedGameAdapter.kt
#	dependencies.gradle
This commit is contained in:
juntao
2022-04-19 09:24:00 +08:00
10 changed files with 47 additions and 19 deletions

View File

@ -409,10 +409,15 @@ public class PackageUtils {
}
PackageManager packageManager = context.getApplicationContext().getPackageManager();
PackageInfo info = packageManager.getPackageArchiveInfo(path, 0);
if (info != null) {
ApplicationInfo appInfo = info.applicationInfo;
return appInfo.packageName;
try {
PackageInfo info = packageManager.getPackageArchiveInfo(path, 0);
if (info != null) {
ApplicationInfo appInfo = info.applicationInfo;
return appInfo.packageName;
}
} catch (Exception e) {
e.printStackTrace();
SentryHelper.INSTANCE.onEvent("GET_PACKAGE_INFO_ERROR", "path", path);
}
return null;