make channel for video compression

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/services/NotificationService.java | 10 
src/main/res/values/strings.xml                                        |  1 
2 files changed, 10 insertions(+), 1 deletion(-)

Detailed changes

src/main/java/eu/siacs/conversations/services/NotificationService.java 🔗

@@ -120,6 +120,14 @@ public class NotificationService {
         errorChannel.setShowBadge(false);
         errorChannel.setGroup("status");
         notificationManager.createNotificationChannel(errorChannel);
+
+        final NotificationChannel videoCompressionChannel = new NotificationChannel("compression",
+                c.getString(R.string.video_compression_channel_name),
+                NotificationManager.IMPORTANCE_LOW);
+        videoCompressionChannel.setShowBadge(false);
+        videoCompressionChannel.setGroup("status");
+        notificationManager.createNotificationChannel(videoCompressionChannel);
+
         final NotificationChannel messagesChannel = new NotificationChannel("messages",
                 c.getString(R.string.messages_channel_name),
                 NotificationManager.IMPORTANCE_HIGH);
@@ -881,7 +889,7 @@ public class NotificationService {
         mBuilder.setSmallIcon(R.drawable.ic_hourglass_empty_white_24dp);
         mBuilder.setContentIntent(createContentIntent(message.getConversation()));
         if (Compatibility.twentySix()) {
-            mBuilder.setChannelId("foreground");
+            mBuilder.setChannelId("compression");
         }
         Notification notification = mBuilder.build();
         notify(FOREGROUND_NOTIFICATION_ID, notification);

src/main/res/values/strings.xml 🔗

@@ -738,4 +738,5 @@
     <string name="silent_messages_channel_description">This notification group is used to display notifications that should not trigger any sound. For example when being active on another device (Grace Period).</string>
     <string name="pref_more_notification_settings">Notification Settings</string>
     <string name="pref_more_notification_settings_summary">Importance, Sound, Vibrate</string>
+    <string name="video_compression_channel_name">Video compression</string>
 </resources>