When retrieving MMS, continue on with best-effort in absence of APNs.

This commit is contained in:
Moxie Marlinspike 2012-11-18 14:51:20 -08:00
parent 5050b43234
commit 47c83d2747

View File

@ -50,14 +50,16 @@ public class MmsDownloadHelper extends MmsCommunication {
}
public static byte[] retrieveMms(Context context, String url, String apn) throws IOException {
try {
MmsConnectionParameters connectionParameters = getMmsConnectionParameters(context, apn);
MmsConnectionParameters connectionParameters;
checkRouteToHost(context, connectionParameters, url);
return makeRequest(connectionParameters, url);
try {
connectionParameters = getMmsConnectionParameters(context, apn);
} catch (MmsException me) {
Log.w("MmsDownloader", me);
throw new IOException("Problem configuring MmsConnectionParameters.");
Log.w("MmsDownloadHelper", me);
connectionParameters = new MmsConnectionParameters(null, null, null);
}
checkRouteToHost(context, connectionParameters, url);
return makeRequest(connectionParameters, url);
}
}