Temporarily comment out icon setter methods since it crashes under API19

This commit is contained in:
neslihanturan 2018-09-18 14:09:13 +03:00
parent 546e37275a
commit 722cab9508

View file

@ -46,6 +46,10 @@ public class UnreadNotificationsCheckAsync extends AsyncTask<Void, Void, Notific
protected void onPostExecute(Notification lastNotification) { protected void onPostExecute(Notification lastNotification) {
super.onPostExecute(lastNotification); super.onPostExecute(lastNotification);
if (lastNotification == null) {
return;
}
Date lastNotificationCheckDate = new Date(context.get() Date lastNotificationCheckDate = new Date(context.get()
.getSharedPreferences("prefs",0) .getSharedPreferences("prefs",0)
.getLong("last_read_notification_date", 0)); .getLong("last_read_notification_date", 0));
@ -71,6 +75,10 @@ public class UnreadNotificationsCheckAsync extends AsyncTask<Void, Void, Notific
} }
private Notification findLastNotification(List<Notification> allNotifications) { private Notification findLastNotification(List<Notification> allNotifications) {
return allNotifications.get(allNotifications.size()-1); if (allNotifications.size() > 0) {
return allNotifications.get(allNotifications.size()-1);
} else {
return null;
}
} }
} }