From 7b9cb67eb7aa3eadf99a5187d2ea79b83ab57380 Mon Sep 17 00:00:00 2001 From: cyBerta Date: Fri, 5 Nov 2021 22:53:07 +0100 Subject: localize notification channel description for tor notifications --- .../java/se/leap/bitmaskclient/tor/TorNotificationManager.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java') diff --git a/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java b/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java index 45570857..c8bc0e2d 100644 --- a/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java +++ b/app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java @@ -75,15 +75,16 @@ public class TorNotificationManager { return null; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { - createNotificationChannel(notificationManager); + createNotificationChannel(context, notificationManager); } return notificationManager; } @TargetApi(26) - private static void createNotificationChannel(NotificationManager notificationManager) { - CharSequence name = "Bitmask Tor Service"; - String description = "Informs about usage of bridges to configure Bitmask."; + private static void createNotificationChannel(Context context, NotificationManager notificationManager) { + String appName = context.getString(R.string.app_name); + CharSequence name = context.getString(R.string.channel_name_tor_service, appName); + String description = context.getString(R.string.channel_description_tor_service, appName); NotificationChannel channel = new NotificationChannel(NOTIFICATION_CHANNEL_NEWSTATUS_ID, name, NotificationManager.IMPORTANCE_LOW); -- cgit v1.2.3