mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Remove old notification system and notification rewrite feature flag.
This commit is contained in:
@@ -18,9 +18,8 @@ import org.signal.core.util.concurrent.SignalExecutors;
|
||||
import org.signal.core.util.logging.Log;
|
||||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.keyvalue.SignalStore;
|
||||
import org.thoughtcrime.securesms.notifications.DefaultMessageNotifier;
|
||||
import org.thoughtcrime.securesms.notifications.NotificationIds;
|
||||
import org.thoughtcrime.securesms.notifications.SingleRecipientNotificationBuilder;
|
||||
import org.thoughtcrime.securesms.notifications.v2.NotificationFactory;
|
||||
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
|
||||
import org.thoughtcrime.securesms.recipients.Recipient;
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId;
|
||||
@@ -90,16 +89,8 @@ public final class BubbleUtil {
|
||||
if (activeThreadNotification != null && activeThreadNotification.deleteIntent != null) {
|
||||
ApplicationDependencies.getMessageNotifier().updateNotification(context, threadId, BubbleState.SHOWN);
|
||||
} else {
|
||||
Recipient recipient = Recipient.resolved(recipientId);
|
||||
SingleRecipientNotificationBuilder builder = new SingleRecipientNotificationBuilder(context, SignalStore.settings().getMessageNotificationsPrivacy());
|
||||
|
||||
builder.addMessageBody(recipient, recipient, "", System.currentTimeMillis(), null);
|
||||
builder.setThread(recipient);
|
||||
builder.setDefaultBubbleState(BubbleState.SHOWN);
|
||||
builder.setGroup(DefaultMessageNotifier.NOTIFICATION_GROUP);
|
||||
|
||||
Log.d(TAG, "Posting Notification for requested bubble");
|
||||
notificationManager.notify(NotificationIds.getNotificationIdForThread(threadId), builder.build());
|
||||
Recipient recipient = Recipient.resolved(recipientId);
|
||||
NotificationFactory.notifyToBubbleConversation(context, recipient, threadId);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import android.app.Application;
|
||||
import android.os.Build;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
@@ -77,7 +75,6 @@ public final class FeatureFlags {
|
||||
private static final String ANIMATED_STICKER_MIN_TOTAL_MEMORY = "android.animatedStickerMinTotalMemory";
|
||||
private static final String MESSAGE_PROCESSOR_ALARM_INTERVAL = "android.messageProcessor.alarmIntervalMins";
|
||||
private static final String MESSAGE_PROCESSOR_DELAY = "android.messageProcessor.foregroundDelayMs";
|
||||
private static final String NOTIFICATION_REWRITE = "android.notificationRewrite";
|
||||
private static final String MP4_GIF_SEND_SUPPORT = "android.mp4GifSendSupport";
|
||||
private static final String MEDIA_QUALITY_LEVELS = "android.mediaQuality.levels";
|
||||
private static final String RETRY_RECEIPT_LIFESPAN = "android.retryReceiptLifespan";
|
||||
@@ -114,7 +111,6 @@ public final class FeatureFlags {
|
||||
ANIMATED_STICKER_MIN_TOTAL_MEMORY,
|
||||
MESSAGE_PROCESSOR_ALARM_INTERVAL,
|
||||
MESSAGE_PROCESSOR_DELAY,
|
||||
NOTIFICATION_REWRITE,
|
||||
MP4_GIF_SEND_SUPPORT,
|
||||
MEDIA_QUALITY_LEVELS,
|
||||
RETRY_RECEIPT_LIFESPAN,
|
||||
@@ -163,7 +159,6 @@ public final class FeatureFlags {
|
||||
MESSAGE_PROCESSOR_ALARM_INTERVAL,
|
||||
MESSAGE_PROCESSOR_DELAY,
|
||||
GV1_FORCED_MIGRATE,
|
||||
NOTIFICATION_REWRITE,
|
||||
MP4_GIF_SEND_SUPPORT,
|
||||
MEDIA_QUALITY_LEVELS,
|
||||
RETRY_RECEIPT_LIFESPAN,
|
||||
@@ -354,11 +349,6 @@ public final class FeatureFlags {
|
||||
return getInteger(ANIMATED_STICKER_MIN_TOTAL_MEMORY, (int) ByteUnit.GIGABYTES.toMegabytes(3));
|
||||
}
|
||||
|
||||
/** Whether or not to use the new notification system. */
|
||||
public static boolean useNewNotificationSystem() {
|
||||
return Build.VERSION.SDK_INT >= 26 || getBoolean(NOTIFICATION_REWRITE, false);
|
||||
}
|
||||
|
||||
public static boolean mp4GifSendSupport() {
|
||||
return getBoolean(MP4_GIF_SEND_SUPPORT, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user