Change the way notifications work for non-default KitKat.

Messages that are not "secure" (encrypted or key exchange) are
automatically marked as read if TextSecure isn't the default
KitKat SMS app.

This change in functionality allows people who aren't using
TextSecure as a default SMS app on KitKat to still receive
notifications when they get incoming encrypted messages.
This commit is contained in:
Moxie Marlinspike
2013-12-07 11:00:20 -08:00
parent 99d295abc5
commit 7489f3463a
3 changed files with 21 additions and 16 deletions

View File

@@ -48,7 +48,6 @@ import org.thoughtcrime.securesms.database.MmsSmsDatabase;
import org.thoughtcrime.securesms.database.model.MessageRecord;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.recipients.Recipients;
import org.thoughtcrime.securesms.util.Util;
import java.io.IOException;
import java.util.List;
@@ -104,10 +103,6 @@ public class MessageNotifier {
return;
}
if (!Util.isDefaultSmsProvider(context)) {
return;
}
updateNotification(context, masterSecret, false);
}
@@ -118,10 +113,6 @@ public class MessageNotifier {
return;
}
if (!Util.isDefaultSmsProvider(context)) {
return;
}
if (visibleThread == threadId) {
DatabaseFactory.getThreadDatabase(context).setRead(threadId);
sendInThreadNotification(context);