Fix for MMS send bug with an APN proxy.

master
Moxie Marlinspike 2013-03-10 15:47:13 -07:00
parent 6687aa0911
commit b05c840616
3 changed files with 8 additions and 4 deletions

View File

@ -53,7 +53,7 @@ import android.util.Log;
public class SessionCipher {
public static Object CIPHER_LOCK = new Object();
public static final Object CIPHER_LOCK = new Object();
public static final int CIPHER_KEY_LENGTH = 16;
public static final int MAC_KEY_LENGTH = 20;

View File

@ -109,8 +109,10 @@ public class MmsDownloader extends MmscProcessor {
} catch (IOException e) {
Log.w("MmsDownloader", e);
if (!item.useMmsRadioMode() && !item.proxyRequestIfPossible()) {
Log.w("MmsDownloader", "Falling back to just radio mode...");
scheduleDownloadWithRadioMode(item);
} else if (!item.proxyRequestIfPossible()) {
Log.w("MmsDownloadeR", "Falling back to radio mode and proxy...");
scheduleDownloadWithRadioModeAndProxy(item);
} else {
DatabaseFactory.getMmsDatabase(context).markDownloadState(item.getMessageId(), MmsDatabase.Types.DOWNLOAD_SOFT_FAILURE);

View File

@ -239,13 +239,15 @@ public class MmsSender extends MmscProcessor {
}
private void scheduleSendWithMmsRadioAndProxy(SendItem item) {
item.useMmsRadio = true;
Log.w("MmsSender", "Falling back to sending MMS with radio and proxy...");
item.useMmsRadio = true;
item.useProxyIfAvailable = true;
handleSendMmsAction(item);
}
private void scheduleSendWithMmsRadio(SendItem item) {
item.useMmsRadio = true;
item.useProxyIfAvailable = true;
Log.w("MmsSender", "Falling back to sending MMS with radio only...");
item.useMmsRadio = true;
handleSendMmsAction(item);
}