From 27681948fca5ca5f0a00fd997a4f9e8a5c416bee Mon Sep 17 00:00:00 2001 From: bspeice Date: Wed, 9 Oct 2013 20:42:44 -0400 Subject: [PATCH] Minor cleanups --- src/com/uncc/gameday/alerts/Alert.java | 2 +- src/com/uncc/gameday/alerts/AlertService.java | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/com/uncc/gameday/alerts/Alert.java b/src/com/uncc/gameday/alerts/Alert.java index 4254108..6769798 100644 --- a/src/com/uncc/gameday/alerts/Alert.java +++ b/src/com/uncc/gameday/alerts/Alert.java @@ -49,7 +49,7 @@ public class Alert { public void displayNotification(Context ctx) { NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx) .setSmallIcon(R.drawable.ic_launcher) - .setContentTitle("GameDay Alert") + .setContentTitle(ctx.getString(R.string.app_name)) .setContentText(this.getMessage()); Intent resultIntent = new Intent(ctx, Home.class); diff --git a/src/com/uncc/gameday/alerts/AlertService.java b/src/com/uncc/gameday/alerts/AlertService.java index 25df483..0040861 100644 --- a/src/com/uncc/gameday/alerts/AlertService.java +++ b/src/com/uncc/gameday/alerts/AlertService.java @@ -18,13 +18,12 @@ public class AlertService extends IntentService { @Override protected void onHandleIntent(Intent intent) { // Go fetch all the alerts! - Context appContext = GameDay.getAppContext(); - AlertDB dbHandle = new AlertDB(); - List alerts = dbHandle.fetchUnread(); + new AlertFetcher().fetchAlerts(this); + List alerts = new AlertDB().fetchUnread(); // And then display all of them! for (Alert a: alerts) { - a.displayNotification(appContext); + a.displayNotification(this); } }