Support for using Signal without Play Services

This is now possible with beta calling, so non-GCM users are a
part of beta calling by default.

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2017-02-20 12:00:03 -08:00
parent 4112f23f33
commit 1669731329
15 changed files with 354 additions and 114 deletions

View File

@@ -58,9 +58,11 @@ import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.RecipientFactory;
import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.service.KeyCachingService;
import org.thoughtcrime.securesms.service.MessageRetrievalService;
import org.thoughtcrime.securesms.util.ServiceUtil;
import org.thoughtcrime.securesms.util.SpanUtil;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import org.thoughtcrime.securesms.webrtc.CallNotificationManager;
import org.whispersystems.signalservice.api.messages.SignalServiceEnvelope;
import java.util.HashSet;
@@ -155,7 +157,12 @@ public class MessageNotifier {
for (StatusBarNotification notification : activeNotifications) {
boolean validNotification = false;
if (notification.getId() != SUMMARY_NOTIFICATION_ID && notification.getId() != NotificationBarManager.RED_PHONE_NOTIFICATION) {
if (notification.getId() != SUMMARY_NOTIFICATION_ID &&
notification.getId() != NotificationBarManager.RED_PHONE_NOTIFICATION &&
notification.getId() != CallNotificationManager.WEBRTC_NOTIFICATION &&
notification.getId() != KeyCachingService.SERVICE_RUNNING_ID &&
notification.getId() != MessageRetrievalService.FOREGROUND_ID)
{
for (NotificationItem item : notificationState.getNotifications()) {
if (notification.getId() == (SUMMARY_NOTIFICATION_ID + item.getThreadId())) {
validNotification = true;