mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
catch all exceptions; the code is running all the time and has the potential to be a total showstopper
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user