Commit 12fb67a7 authored by Simon Redman's avatar Simon Redman
Browse files

Change hard-coded string to use library-provided constant

Does this cause problems with older SDKs? I don't think so. (If there are problems, I assume they were already there)
parent d03520ce
* Copyright 2014 Albert Vaca Cintora <>
* Copyright 2019 Simon Redman <>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
......@@ -32,6 +33,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.provider.Telephony;
import android.telephony.PhoneNumberUtils;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
......@@ -127,7 +129,7 @@ public class SMSPlugin extends Plugin {
//Log.e("TelephonyPlugin","Telephony event: " + action);
if ("android.provider.Telephony.SMS_RECEIVED".equals(action)) {
if (Telephony.Sms.Intents.SMS_RECEIVED_ACTION.equals(action)) {
final Bundle bundle = intent.getExtras();
if (bundle == null) return;
......@@ -274,7 +276,7 @@ public class SMSPlugin extends Plugin {
public boolean onCreate() {
permissionExplanation = R.string.telepathy_permission_explanation;
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
IntentFilter filter = new IntentFilter(Telephony.Sms.Intents.SMS_RECEIVED_ACTION);
context.registerReceiver(receiver, filter);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment