From 9c5f9b3ac86f3aee81c8ab91960f1d30267b9c5d Mon Sep 17 00:00:00 2001 From: Scott Jackson Date: Thu, 17 Jul 2014 10:33:58 -0700 Subject: Move to displaying less generic sync title --- src/github/daneren2005/dsub/util/Notifications.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/github') diff --git a/src/github/daneren2005/dsub/util/Notifications.java b/src/github/daneren2005/dsub/util/Notifications.java index 75c69d9e..fc375076 100644 --- a/src/github/daneren2005/dsub/util/Notifications.java +++ b/src/github/daneren2005/dsub/util/Notifications.java @@ -295,13 +295,15 @@ public final class Notifications { public static void showSyncNotification(final Context context, int stringId, String extra) { if(Util.getPreferences(context).getBoolean(Constants.PREFERENCES_KEY_SYNC_NOTIFICATION, true)) { - String content = (extra != null) ? context.getResources().getString(stringId, extra) : context.getResources().getString(stringId); + if(extra == null) { + extra = ""; + } NotificationCompat.Builder builder; builder = new NotificationCompat.Builder(context) .setSmallIcon(R.drawable.stat_notify_sync) - .setContentTitle(context.getResources().getString(R.string.sync_title)) - .setContentText(content) + .setContentTitle(context.getResources().getString(stringId)) + .setContentText(extra) .setStyle(new NotificationCompat.BigTextStyle().bigText(content.replace(", ", "\n"))) .setOngoing(false) .setGroup(NOTIFICATION_SYNC_GROUP) -- cgit v1.2.3