mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-23 18:15:22 +00:00
Fix for MMS send bug with an APN proxy.
This commit is contained in:
parent
6687aa0911
commit
b05c840616
@ -53,7 +53,7 @@ import android.util.Log;
|
|||||||
|
|
||||||
public class SessionCipher {
|
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 CIPHER_KEY_LENGTH = 16;
|
||||||
public static final int MAC_KEY_LENGTH = 20;
|
public static final int MAC_KEY_LENGTH = 20;
|
||||||
|
@ -109,8 +109,10 @@ public class MmsDownloader extends MmscProcessor {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.w("MmsDownloader", e);
|
Log.w("MmsDownloader", e);
|
||||||
if (!item.useMmsRadioMode() && !item.proxyRequestIfPossible()) {
|
if (!item.useMmsRadioMode() && !item.proxyRequestIfPossible()) {
|
||||||
|
Log.w("MmsDownloader", "Falling back to just radio mode...");
|
||||||
scheduleDownloadWithRadioMode(item);
|
scheduleDownloadWithRadioMode(item);
|
||||||
} else if (!item.proxyRequestIfPossible()) {
|
} else if (!item.proxyRequestIfPossible()) {
|
||||||
|
Log.w("MmsDownloadeR", "Falling back to radio mode and proxy...");
|
||||||
scheduleDownloadWithRadioModeAndProxy(item);
|
scheduleDownloadWithRadioModeAndProxy(item);
|
||||||
} else {
|
} else {
|
||||||
DatabaseFactory.getMmsDatabase(context).markDownloadState(item.getMessageId(), MmsDatabase.Types.DOWNLOAD_SOFT_FAILURE);
|
DatabaseFactory.getMmsDatabase(context).markDownloadState(item.getMessageId(), MmsDatabase.Types.DOWNLOAD_SOFT_FAILURE);
|
||||||
|
@ -239,13 +239,15 @@ public class MmsSender extends MmscProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleSendWithMmsRadioAndProxy(SendItem item) {
|
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);
|
handleSendMmsAction(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void scheduleSendWithMmsRadio(SendItem item) {
|
private void scheduleSendWithMmsRadio(SendItem item) {
|
||||||
item.useMmsRadio = true;
|
Log.w("MmsSender", "Falling back to sending MMS with radio only...");
|
||||||
item.useProxyIfAvailable = true;
|
item.useMmsRadio = true;
|
||||||
handleSendMmsAction(item);
|
handleSendMmsAction(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user