mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-22 16:07:30 +00:00
Merge pull request #94 from thoughtbox/Change-default-behaviour-when-receiving-"flash"-messages
Changes default behaviour for CLASS 0 messages
This commit is contained in:
commit
c83d57aa59
@ -31,10 +31,16 @@ public class SmsListener extends BroadcastReceiver {
|
|||||||
private static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED";
|
private static final String SMS_RECEIVED_ACTION = "android.provider.Telephony.SMS_RECEIVED";
|
||||||
|
|
||||||
private boolean isExemption(SmsMessage message, String messageBody) {
|
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?")) {
|
if (messageBody.startsWith("Sparebank1://otp?")) {
|
||||||
return (true);
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sprint Visual Voicemail
|
// Sprint Visual Voicemail
|
||||||
return
|
return
|
||||||
message.getOriginatingAddress().length() < 7 &&
|
message.getOriginatingAddress().length() < 7 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user