From f7d898d5e3686e0180e66715fb2deaa7fb8cd4c0 Mon Sep 17 00:00:00 2001 From: Ryan ZHAO Date: Mon, 18 Jan 2021 15:37:23 +1100 Subject: [PATCH] WIP make things compile --- .../org/thoughtcrime/securesms/mms/LegacyMmsConnection.java | 5 +++-- .../session/libsession/utilities/TextSecurePreferences.kt | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java b/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java index 4ee9c5019b..82c6ed16e0 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java +++ b/app/src/main/java/org/thoughtcrime/securesms/mms/LegacyMmsConnection.java @@ -45,10 +45,11 @@ import org.apache.http.message.BasicHeader; import org.thoughtcrime.securesms.database.ApnDatabase; import org.thoughtcrime.securesms.util.ServiceUtil; import org.thoughtcrime.securesms.util.TelephonyUtil; -import org.thoughtcrime.securesms.util.TextSecurePreferences; -import org.thoughtcrime.securesms.util.Util; import org.session.libsignal.libsignal.util.guava.Optional; +import org.session.libsession.utilities.TextSecurePreferences; +import org.session.libsession.utilities.Util; + import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; diff --git a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt index 58117a5f7b..3e47b8d19c 100644 --- a/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt +++ b/libsession/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt @@ -756,6 +756,7 @@ object TextSecurePreferences { setStringPreference(context, MMSC_PASSWORD_PREF, value) } + @JvmStatic fun getMmsUserAgent(context: Context, defaultUserAgent: String): String { val useCustom: Boolean = getBooleanPreference(context, MMS_CUSTOM_USER_AGENT, false) return if (useCustom) getStringPreference(context, MMS_USER_AGENT, defaultUserAgent)!! else defaultUserAgent