package me.teafry.voipmessages; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; /** * SmsManager saying an MMS download finished. Apart from MmsReceiver because * that one only takes broadcasts from holders of BROADCAST_WAP_PUSH, and this * one comes from our own PendingIntent. */ public final class MmsDownloaded extends BroadcastReceiver { @Override public void onReceive(Context c, Intent intent) { Context app = c.getApplicationContext(); int result = getResultCode(); PendingResult done = goAsync(); new Thread(() -> { try { Sim.downloaded(app, intent, result); } finally { done.finish(); } }, "mms-in").start(); } }