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.
This commit is contained in:
Tor Houghton 2012-11-24 14:29:31 +01:00
parent d8cd09d46b
commit 4ced1a0f18

View File

@ -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 &&