From 4ced1a0f185500ce03a2e48ecc257f40c8728964 Mon Sep 17 00:00:00 2001 From: Tor Houghton Date: Sat, 24 Nov 2012 14:29:31 +0100 Subject: [PATCH] Changes default behaviour for CLASS 0 messages "Flash" messages are no longer handled by TS. Sorry for the multiple pulls -- previous request had a cut+paste typo. --- .../thoughtcrime/securesms/service/SmsListener.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/service/SmsListener.java b/src/org/thoughtcrime/securesms/service/SmsListener.java index 194ba3677a..62f7f58a44 100644 --- a/src/org/thoughtcrime/securesms/service/SmsListener.java +++ b/src/org/thoughtcrime/securesms/service/SmsListener.java @@ -31,10 +31,16 @@ public class SmsListener extends BroadcastReceiver { private static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED"; private boolean isExemption(SmsMessage message, String messageBody) { - // ignore OTP messages from Sparebank1 (Norwegian bank) + + // ignore CLASS0 ("flash") messages + if (message.getMessageClass() == SmsMessage.MessageClass.CLASS_0) + return true; + + // ignore OTP messages from Sparebank1 (Norwegian bank) if (messageBody.startsWith("Sparebank1://otp?")) { - return (true); - } + return true; + } + // Sprint Visual Voicemail return message.getOriginatingAddress().length() < 7 &&