mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 01:07:47 +00:00
actually fallback when mms local params unset
// FREEBIE
This commit is contained in:
parent
cfccd367ad
commit
b5941fb3fd
@ -20,6 +20,7 @@ import android.content.Context;
|
|||||||
import android.content.res.AssetManager;
|
import android.content.res.AssetManager;
|
||||||
import android.database.Cursor;
|
import android.database.Cursor;
|
||||||
import android.database.sqlite.SQLiteDatabase;
|
import android.database.sqlite.SQLiteDatabase;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import org.thoughtcrime.securesms.mms.ApnUnavailableException;
|
import org.thoughtcrime.securesms.mms.ApnUnavailableException;
|
||||||
@ -94,9 +95,8 @@ public class ApnDatabase {
|
|||||||
}
|
}
|
||||||
protected Apn getLocallyConfiguredMmsConnectionParameters() throws ApnUnavailableException {
|
protected Apn getLocallyConfiguredMmsConnectionParameters() throws ApnUnavailableException {
|
||||||
if (TextSecurePreferences.isUseLocalApnsEnabled(context)) {
|
if (TextSecurePreferences.isUseLocalApnsEnabled(context)) {
|
||||||
String mmsc = TextSecurePreferences.getMmscUrl(context);
|
String mmsc = TextSecurePreferences.getMmscUrl(context).trim();
|
||||||
|
if (TextUtils.isEmpty(mmsc))
|
||||||
if (mmsc == null)
|
|
||||||
throw new ApnUnavailableException("Malformed locally configured MMSC.");
|
throw new ApnUnavailableException("Malformed locally configured MMSC.");
|
||||||
|
|
||||||
if (!mmsc.startsWith("http"))
|
if (!mmsc.startsWith("http"))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user