From b5941fb3fdfe19c35462f9e7edbb922971b61004 Mon Sep 17 00:00:00 2001 From: Jake McGinty Date: Wed, 15 Oct 2014 17:14:12 -0700 Subject: [PATCH] actually fallback when mms local params unset // FREEBIE --- src/org/thoughtcrime/securesms/database/ApnDatabase.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/org/thoughtcrime/securesms/database/ApnDatabase.java b/src/org/thoughtcrime/securesms/database/ApnDatabase.java index fe4c50d40c..8e91623000 100644 --- a/src/org/thoughtcrime/securesms/database/ApnDatabase.java +++ b/src/org/thoughtcrime/securesms/database/ApnDatabase.java @@ -20,6 +20,7 @@ import android.content.Context; import android.content.res.AssetManager; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; +import android.text.TextUtils; import android.util.Log; import org.thoughtcrime.securesms.mms.ApnUnavailableException; @@ -94,9 +95,8 @@ public class ApnDatabase { } protected Apn getLocallyConfiguredMmsConnectionParameters() throws ApnUnavailableException { if (TextSecurePreferences.isUseLocalApnsEnabled(context)) { - String mmsc = TextSecurePreferences.getMmscUrl(context); - - if (mmsc == null) + String mmsc = TextSecurePreferences.getMmscUrl(context).trim(); + if (TextUtils.isEmpty(mmsc)) throw new ApnUnavailableException("Malformed locally configured MMSC."); if (!mmsc.startsWith("http"))