catch all exceptions; the code is running all the time and has the potential to be a total showstopper

This commit is contained in:
B. Petersen
2019-06-08 02:21:24 +02:00
parent 951121cdb7
commit 7b194ae179
@@ -47,8 +47,8 @@ public class OutdatedReminder extends Reminder {
if (context == null) {
return false;
}
final PackageManager packageManager = context.getPackageManager();
try {
final PackageManager packageManager = context.getPackageManager();
String packageName = context.getPackageName();
if (packageManager.getInstallerPackageName(packageName) == null) {
long lastUpdateTime = packageManager
@@ -59,7 +59,7 @@ public class OutdatedReminder extends Reminder {
long diffInDays = TimeUnit.MILLISECONDS.toDays(diff);
return diffInDays >= OUTDATED_THRESHOLD_IN_DAYS;
}
} catch (final PackageManager.NameNotFoundException e) {
} catch (Exception e) {
e.printStackTrace();
}
return false;