Added UI service

Unfinished work
This commit is contained in:
M66B
2019-02-27 15:05:15 +00:00
parent a736035bc9
commit 861cf0eb4a
12 changed files with 1876 additions and 1781 deletions

View File

@@ -374,11 +374,11 @@ public class ServiceSend extends LifecycleService {
long now = new Date().getTime();
long delayed = now - message.last_attempt;
if (delayed > IDENTITY_ERROR_AFTER * 60 * 1000L) {
if (delayed > IDENTITY_ERROR_AFTER * 60 * 1000L || ex instanceof SendFailedException) {
Log.i("Reporting send error after=" + delayed);
NotificationManager nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
nm.notify("send", message.identity.intValue(),
Helper.getNotificationError(this, ident.name, ex).build());
Core.getNotificationError(this, ident.name, ex).build());
}
throw ex;