comment #324 & #327 - Oops :(

This commit is contained in:
tom79 2019-10-31 14:38:32 +01:00
parent b76b560cd3
commit 40caa86a9c
2 changed files with 20 additions and 20 deletions

View File

@ -107,6 +107,7 @@ public class LiveNotificationDelayedService extends Service {
NotificationManager.IMPORTANCE_DEFAULT);
((NotificationManager) Objects.requireNonNull(getSystemService(Context.NOTIFICATION_SERVICE))).createNotificationChannel(channel);
}
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
List<Account> accountStreams = new AccountDAO(getApplicationContext(), db).getAllAccountCrossAction();
totalAccount = 0;
@ -120,7 +121,6 @@ public class LiveNotificationDelayedService extends Service {
}
}
}
if( totalAccount > 0) {
Intent myIntent = new Intent(getApplicationContext(), MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(

View File

@ -151,6 +151,7 @@ public class LiveNotificationService extends Service implements NetworkStateRece
NotificationManager.IMPORTANCE_DEFAULT);
((NotificationManager) Objects.requireNonNull(getSystemService(Context.NOTIFICATION_SERVICE))).createNotificationChannel(channel);
}
SQLiteDatabase db = Sqlite.getInstance(getApplicationContext(), Sqlite.DB_NAME, null, Sqlite.DB_VERSION).open();
List<Account> accountStreams = new AccountDAO(getApplicationContext(), db).getAllAccountCrossAction();
totalAccount = 0;
@ -162,7 +163,6 @@ public class LiveNotificationService extends Service implements NetworkStateRece
}
}
}
}
if( totalAccount > 0) {
Intent myIntent = new Intent(getApplicationContext(), MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(