catch package manager has died exception

This commit is contained in:
Daniel Gultsch 2015-08-19 12:24:42 +02:00
parent 569bc435d3
commit 9ebd6d503c

View file

@ -97,7 +97,7 @@ public class PhoneHelper {
if (packageName != null) {
try {
return context.getPackageManager().getPackageInfo(packageName, 0).versionName;
} catch (final PackageManager.NameNotFoundException e) {
} catch (final PackageManager.NameNotFoundException | RuntimeException e) {
return "unknown";
}
} else {