Add a separate 'internal issues' notification channel.

This commit is contained in:
Greyson Parrelli
2026-06-16 09:56:45 -04:00
parent e0dd576cb1
commit 52dcbb8bc6
3 changed files with 10 additions and 1 deletions
@@ -152,7 +152,7 @@ object IssueReporter {
return
}
val notification: Notification = NotificationCompat.Builder(context, NotificationChannels.getInstance().FAILURES)
val notification: Notification = NotificationCompat.Builder(context, NotificationChannels.getInstance().INTERNAL_ISSUES)
.setSmallIcon(R.drawable.ic_notification)
.setContentTitle("[Internal-only] Issue detected")
.setContentText("$name (${priority.label}). Please tap to get a debug log.")
@@ -36,6 +36,7 @@ import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientId;
import org.thoughtcrime.securesms.util.ConversationUtil;
import org.signal.core.util.ServiceUtil;
import org.thoughtcrime.securesms.util.RemoteConfig;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import java.util.ArrayList;
@@ -80,6 +81,7 @@ public class NotificationChannels {
public final String APP_ALERTS = "app_alerts";
public final String ADDITIONAL_MESSAGE_NOTIFICATIONS = "additional_message_notifications";
public final String NEW_LINKED_DEVICE = "new_linked_device";
public final String INTERNAL_ISSUES = "internal_issues";
private static volatile NotificationChannels instance;
@@ -661,6 +663,11 @@ public class NotificationChannels {
} else {
notificationManager.deleteNotificationChannel(APP_UPDATES);
}
if (RemoteConfig.internalUser()) {
NotificationChannel internalIssues = new NotificationChannel(INTERNAL_ISSUES, context.getString(R.string.NotificationChannel_internal_issues), NotificationManager.IMPORTANCE_HIGH);
notificationManager.createNotificationChannel(internalIssues);
}
}
@TargetApi(26)
+2
View File
@@ -3398,6 +3398,8 @@
<string name="NotificationChannel_calls">Calls</string>
<!-- Notification channel name for notifications involving failures of some sort (eg donations, message sends, etc.) -->
<string name="NotificationChannel_failures">Failures</string>
<!-- Notification channel name for internal-only app issue notifications. Only ever shown to internal users. -->
<string name="NotificationChannel_internal_issues">Internal Issues</string>
<string name="NotificationChannel_backups">Backups</string>
<string name="NotificationChannel_locked_status">Lock status</string>
<string name="NotificationChannel_app_updates">App updates</string>