summaryrefslogtreecommitdiff
path: root/app/src/main/java
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2021-11-05 22:53:07 +0100
committercyBerta <cyberta@riseup.net>2021-11-05 22:53:07 +0100
commit7b9cb67eb7aa3eadf99a5187d2ea79b83ab57380 (patch)
treeea380e54bafd4f53465646c1a75efb3df7ca27d7 /app/src/main/java
parent88b7dc2eb3dcbec8d1e637096867c15211818677 (diff)
localize notification channel description for tor notifications
Diffstat (limited to 'app/src/main/java')
-rw-r--r--app/src/main/java/se/leap/bitmaskclient/tor/TorNotificationManager.java9
1 files changed, 5 insertions, 4 deletions
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);