add a try/catch block around the reminder-stuff. there is the PowerManager envolved that may create all kind of problems. so i like to be sure-careful here, also as the code is run frequently and may cause problems only on very few devices.

This commit is contained in:
B. Petersen
2019-12-16 14:30:14 +01:00
parent 4226d23f2d
commit 2434daa173
@@ -184,20 +184,18 @@ public class ConversationListFragment extends Fragment
@Override
protected Optional<? extends Reminder> doInBackground(Context... params) {
final Context context = params[0];
// if (ExpiredBuildReminder.isEligible()) {
// return Optional.of(new ExpiredBuildReminder(context));
// } else if (OutdatedBuildReminder.isEligible()) {
// return Optional.of(new OutdatedBuildReminder(context));
// } else
try {
if (DozeReminder.isEligible(context)) {
DozeReminder.addDozeReminderDeviceMsg(context);
return Optional.absent();
} else if (OutdatedReminder.isEligible(context)) {
return Optional.of(new OutdatedReminder(context));
}
else {
return Optional.absent();
}
} catch(Exception e) {
e.printStackTrace();
}
return Optional.absent();
}
@Override