Ignores MMS WAP_PUSH_DELIVER_ACTION if we're not the default app.

Apparently some ROMs have a bug where they broadcast
WAP_PUSH_DELIVER_ACTION even when you're not the system's default
SMS/MMS app.

Fixes #2777
This commit is contained in:
Moxie Marlinspike 2015-03-25 08:57:08 -07:00
parent f38bd7b187
commit 472179b550

View file

@ -77,7 +77,8 @@ public class MmsListener extends BroadcastReceiver {
public void onReceive(Context context, Intent intent) {
Log.w("MmsListener", "Got MMS broadcast..." + intent.getAction());
if (Telephony.Sms.Intents.WAP_PUSH_DELIVER_ACTION.equals(intent.getAction()) ||
if ((Telephony.Sms.Intents.WAP_PUSH_DELIVER_ACTION.equals(intent.getAction()) &&
Util.isDefaultSmsProvider(context)) ||
(Telephony.Sms.Intents.WAP_PUSH_RECEIVED_ACTION.equals(intent.getAction()) &&
isRelevant(context, intent)))
{