mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-08-07 13:55:56 +01:00
Add a separate 'internal issues' notification channel.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user