From f209fa6772426439626eec54db1e94c4ac520c2a Mon Sep 17 00:00:00 2001 From: cyBerta Date: Wed, 29 May 2019 13:03:45 +0200 Subject: [PATCH] remove unneded interface --- .../securesms/notifications/IMessageNotifier.java | 12 ------------ .../securesms/notifications/MessageNotifier.java | 8 +------- .../notifications/MessageNotifierCompat.java | 2 +- 3 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/org/thoughtcrime/securesms/notifications/IMessageNotifier.java diff --git a/src/org/thoughtcrime/securesms/notifications/IMessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/IMessageNotifier.java deleted file mode 100644 index b88886752..000000000 --- a/src/org/thoughtcrime/securesms/notifications/IMessageNotifier.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.thoughtcrime.securesms.notifications; - -public interface IMessageNotifier { - - void playSendSound(); - void updateVisibleChat(int chatId); - void updateNotification(int chatId, int messageId); - void onNotificationPrivacyChanged(); - void removeNotifications(int[] chatIds); - void removeNotifications(int chatId); - -} diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java index 2e8c03f2b..de1cdc0a6 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifier.java @@ -31,7 +31,7 @@ import java.util.concurrent.TimeUnit; import static org.thoughtcrime.securesms.notifications.MessageNotifierCompat.NO_VISIBLE_CHAT_ID; import static org.thoughtcrime.securesms.notifications.MessageNotifierCompat.SUMMARY_NOTIFICATION_ID; -abstract class MessageNotifier implements IMessageNotifier { +abstract class MessageNotifier { static final String TAG = org.thoughtcrime.securesms.notifications.MessageNotifierApi23.class.getSimpleName(); @@ -68,14 +68,12 @@ abstract class MessageNotifier implements IMessageNotifier { }); } - @Override public void playSendSound() { if (Prefs.isInChatNotifications(appContext) && soundOutLoaded) { soundPool.play(soundOut, 1.0f, 1.0f, 1, 0, 1.0f); } } - @Override public void updateVisibleChat(int chatId) { visibleChatId = chatId; if (visibleChatId != NO_VISIBLE_CHAT_ID) { @@ -83,7 +81,6 @@ abstract class MessageNotifier implements IMessageNotifier { } } - @Override public void updateNotification(int chatId, int messageId) { boolean isVisible = visibleChatId == chatId; ApplicationDcContext dcContext = DcHelper.getContext(appContext); @@ -113,7 +110,6 @@ abstract class MessageNotifier implements IMessageNotifier { * On notification privacy preference changed, * the notification state needs to be updated. */ - @Override public void onNotificationPrivacyChanged() { if (!Prefs.isNotificationsEnabled(appContext)) { return; @@ -128,7 +124,6 @@ abstract class MessageNotifier implements IMessageNotifier { } } - @Override public void removeNotifications(int[] chatIds) { List removedItems = new LinkedList<>(); for (int id : chatIds) { @@ -138,7 +133,6 @@ abstract class MessageNotifier implements IMessageNotifier { recreateSummaryNotification(); } - @Override public void removeNotifications(int chatId) { List removedItems = notificationState.removeNotificationsForChat(chatId); cancelNotifications(removedItems); diff --git a/src/org/thoughtcrime/securesms/notifications/MessageNotifierCompat.java b/src/org/thoughtcrime/securesms/notifications/MessageNotifierCompat.java index 610319668..0c2253dd1 100644 --- a/src/org/thoughtcrime/securesms/notifications/MessageNotifierCompat.java +++ b/src/org/thoughtcrime/securesms/notifications/MessageNotifierCompat.java @@ -10,7 +10,7 @@ public class MessageNotifierCompat { static final String EXTRA_REMOTE_REPLY = "extra_remote_reply"; - private static IMessageNotifier instance; + private static MessageNotifier instance; public static void init(Context context) { if (instance != null) {