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
fork-5.53.8
Moxie Marlinspike 2015-03-25 08:57:08 -07:00
rodzic f38bd7b187
commit 472179b550
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -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)))
{