mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user