Revert "after merge imports optimiztion"
This reverts commit 999a45dc51
.
This commit is contained in:
parent
999a45dc51
commit
2c749c8d95
|
@ -14,18 +14,19 @@ import com.google.common.base.Strings;
|
|||
import com.google.common.collect.Collections2;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import de.measite.minidns.AbstractDNSClient;
|
||||
import de.measite.minidns.DNSMessage;
|
||||
import de.measite.minidns.Record;
|
||||
import de.measite.minidns.record.Data;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.InetAddress;
|
||||
import java.time.Duration;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import de.measite.minidns.AbstractDNSClient;
|
||||
import de.measite.minidns.DNSMessage;
|
||||
import de.measite.minidns.Record;
|
||||
import de.measite.minidns.record.Data;
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
public class AndroidDNSClient extends AbstractDNSClient {
|
||||
|
||||
private static final long DNS_MAX_TTL = 86_400L;
|
||||
|
|
|
@ -7,6 +7,10 @@ import com.google.common.base.Strings;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.SettableFuture;
|
||||
|
||||
import de.measite.minidns.DNSMessage;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
import org.conscrypt.OkHostnameVerifier;
|
||||
|
||||
import java.io.Closeable;
|
||||
|
@ -32,9 +36,6 @@ import javax.net.ssl.SSLSession;
|
|||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
|
||||
import de.measite.minidns.DNSMessage;
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
final class DNSSocket implements Closeable {
|
||||
|
||||
public static final int QUERY_TIMEOUT = 5_000;
|
||||
|
|
|
@ -11,6 +11,13 @@ import com.google.common.cache.LoadingCache;
|
|||
import com.google.common.cache.RemovalListener;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import de.measite.minidns.DNSMessage;
|
||||
import de.measite.minidns.MiniDNSException;
|
||||
import de.measite.minidns.source.DNSDataSource;
|
||||
import de.measite.minidns.util.MultipleIoException;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.DatagramPacket;
|
||||
import java.net.DatagramSocket;
|
||||
|
@ -21,12 +28,6 @@ import java.util.Map;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import de.measite.minidns.DNSMessage;
|
||||
import de.measite.minidns.MiniDNSException;
|
||||
import de.measite.minidns.source.DNSDataSource;
|
||||
import de.measite.minidns.util.MultipleIoException;
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
public class NetworkDataSource extends DNSDataSource {
|
||||
|
||||
private static final LoadingCache<DNSServer, DNSSocket> socketCache =
|
||||
|
|
|
@ -3,15 +3,15 @@ package eu.siacs.conversations;
|
|||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
|
||||
import eu.siacs.conversations.crypto.XmppDomainVerifier;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.chatstate.ChatState;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import eu.siacs.conversations.crypto.XmppDomainVerifier;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.chatstate.ChatState;
|
||||
|
||||
public final class Config {
|
||||
private static final int UNENCRYPTED = 1;
|
||||
private static final int OPENPGP = 2;
|
||||
|
|
|
@ -8,14 +8,14 @@ import android.os.Build;
|
|||
import android.provider.ContactsContract;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.services.QuickConversationsService;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class JabberIdContact extends AbstractPhoneContact {
|
||||
|
||||
private static final String[] PROJECTION =
|
||||
|
|
|
@ -31,11 +31,14 @@ package eu.siacs.conversations.crypto;
|
|||
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.preference.PreferenceManager;
|
||||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
|
||||
public class OmemoSetting {
|
||||
|
|
|
@ -10,15 +10,15 @@ import com.google.common.collect.BiMap;
|
|||
import com.google.common.collect.Collections2;
|
||||
import com.google.common.collect.ImmutableBiMap;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.utils.SSLSockets;
|
||||
import eu.siacs.conversations.xml.Element;
|
||||
import eu.siacs.conversations.xml.Namespace;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
public enum ChannelBinding {
|
||||
NONE,
|
||||
TLS_EXPORTER,
|
||||
|
|
|
@ -6,17 +6,17 @@ import com.google.common.base.Preconditions;
|
|||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Collections2;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import javax.net.ssl.SSLSocket;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.utils.SSLSockets;
|
||||
import eu.siacs.conversations.xml.Element;
|
||||
import eu.siacs.conversations.xml.Namespace;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import javax.net.ssl.SSLSocket;
|
||||
|
||||
public abstract class SaslMechanism {
|
||||
|
||||
protected final Account account;
|
||||
|
|
|
@ -3,6 +3,10 @@ package eu.siacs.conversations.crypto.sasl;
|
|||
import com.google.common.hash.HashFunction;
|
||||
import com.google.common.hash.Hashing;
|
||||
|
||||
import org.bouncycastle.crypto.Digest;
|
||||
import org.bouncycastle.crypto.digests.SHA256Digest;
|
||||
import org.bouncycastle.crypto.macs.HMac;
|
||||
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
||||
public class ScramSha256 extends ScramMechanism {
|
||||
|
|
|
@ -3,6 +3,10 @@ package eu.siacs.conversations.crypto.sasl;
|
|||
import com.google.common.hash.HashFunction;
|
||||
import com.google.common.hash.Hashing;
|
||||
|
||||
import org.bouncycastle.crypto.Digest;
|
||||
import org.bouncycastle.crypto.digests.SHA512Digest;
|
||||
import org.bouncycastle.crypto.macs.HMac;
|
||||
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
||||
public class ScramSha512 extends ScramMechanism {
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.siacs.conversations.entities;
|
||||
|
||||
import static eu.siacs.conversations.entities.Bookmark.printableValue;
|
||||
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
|
@ -12,6 +10,7 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.Canvas;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.telephony.PhoneNumberUtils;
|
||||
|
@ -25,6 +24,7 @@ import android.text.TextUtils;
|
|||
import android.text.TextWatcher;
|
||||
import android.text.util.Linkify;
|
||||
import android.util.DisplayMetrics;
|
||||
import android.util.LruCache;
|
||||
import android.util.Pair;
|
||||
import android.util.SparseArray;
|
||||
import android.view.Gravity;
|
||||
|
@ -82,6 +82,7 @@ import java.time.format.FormatStyle;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Objects;
|
||||
|
@ -110,6 +111,7 @@ import eu.siacs.conversations.databinding.CommandTextFieldBinding;
|
|||
import eu.siacs.conversations.databinding.CommandUnknownBinding;
|
||||
import eu.siacs.conversations.databinding.CommandWebviewBinding;
|
||||
import eu.siacs.conversations.databinding.DialogQuickeditBinding;
|
||||
import eu.siacs.conversations.http.HttpConnectionManager;
|
||||
import eu.siacs.conversations.persistance.DatabaseBackend;
|
||||
import eu.siacs.conversations.services.AvatarService;
|
||||
import eu.siacs.conversations.services.QuickConversationsService;
|
||||
|
@ -133,6 +135,8 @@ import eu.siacs.conversations.xmpp.stanzas.IqPacket;
|
|||
import io.michaelrocks.libphonenumber.android.NumberParseException;
|
||||
import me.saket.bettermovementmethod.BetterLinkMovementMethod;
|
||||
|
||||
import static eu.siacs.conversations.entities.Bookmark.printableValue;
|
||||
|
||||
|
||||
public class Conversation extends AbstractEntity implements Blockable, Comparable<Conversation>, Conversational, AvatarService.Avatarable {
|
||||
public static final String TABLENAME = "conversations";
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.content.ContentValues;
|
|||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.text.SpannableStringBuilder;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
|
|
@ -2,6 +2,15 @@ package eu.siacs.conversations.generator;
|
|||
|
||||
import android.util.Base64;
|
||||
|
||||
import eu.siacs.conversations.BuildConfig;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.xml.Namespace;
|
||||
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.SimpleDateFormat;
|
||||
|
@ -12,15 +21,6 @@ import java.util.List;
|
|||
import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
|
||||
import eu.siacs.conversations.BuildConfig;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.xml.Namespace;
|
||||
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||
|
||||
public abstract class AbstractGenerator {
|
||||
private static final SimpleDateFormat DATE_FORMAT =
|
||||
new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US);
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.siacs.conversations.http;
|
||||
|
||||
import static eu.siacs.conversations.http.HttpConnectionManager.EXECUTOR;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
@ -35,6 +33,8 @@ import okhttp3.OkHttpClient;
|
|||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
import static eu.siacs.conversations.http.HttpConnectionManager.EXECUTOR;
|
||||
|
||||
public class HttpDownloadConnection implements Transferable {
|
||||
|
||||
private final Message message;
|
||||
|
|
|
@ -33,35 +33,11 @@ import eu.siacs.conversations.medialib.adapters.FiltersAdapter
|
|||
import eu.siacs.conversations.medialib.dialogs.ColorPickerDialog
|
||||
import eu.siacs.conversations.medialib.dialogs.OtherAspectRatioDialog
|
||||
import eu.siacs.conversations.medialib.dialogs.ResizeDialog
|
||||
import eu.siacs.conversations.medialib.extensions.applyColorFilter
|
||||
import eu.siacs.conversations.medialib.extensions.beGone
|
||||
import eu.siacs.conversations.medialib.extensions.beVisible
|
||||
import eu.siacs.conversations.medialib.extensions.beVisibleIf
|
||||
import eu.siacs.conversations.medialib.extensions.config
|
||||
import eu.siacs.conversations.medialib.extensions.copyNonDimensionAttributesTo
|
||||
import eu.siacs.conversations.medialib.extensions.ensureBackgroundThread
|
||||
import eu.siacs.conversations.medialib.extensions.getCompressionFormat
|
||||
import eu.siacs.conversations.medialib.extensions.getRealPathFromURI
|
||||
import eu.siacs.conversations.medialib.extensions.isGone
|
||||
import eu.siacs.conversations.medialib.extensions.isNougatPlus
|
||||
import eu.siacs.conversations.medialib.extensions.isVisible
|
||||
import eu.siacs.conversations.medialib.extensions.onGlobalLayout
|
||||
import eu.siacs.conversations.medialib.extensions.onSeekBarChangeListener
|
||||
import eu.siacs.conversations.medialib.extensions.showErrorToast
|
||||
import eu.siacs.conversations.medialib.extensions.toast
|
||||
import eu.siacs.conversations.medialib.helpers.ASPECT_RATIO_FOUR_THREE
|
||||
import eu.siacs.conversations.medialib.helpers.ASPECT_RATIO_FREE
|
||||
import eu.siacs.conversations.medialib.helpers.ASPECT_RATIO_ONE_ONE
|
||||
import eu.siacs.conversations.medialib.helpers.ASPECT_RATIO_OTHER
|
||||
import eu.siacs.conversations.medialib.helpers.ASPECT_RATIO_SIXTEEN_NINE
|
||||
import eu.siacs.conversations.medialib.helpers.FilterThumbnailsManager
|
||||
import eu.siacs.conversations.medialib.helpers.REAL_FILE_PATH
|
||||
import eu.siacs.conversations.medialib.extensions.*
|
||||
import eu.siacs.conversations.medialib.helpers.*
|
||||
import eu.siacs.conversations.medialib.models.FilterItem
|
||||
import eu.siacs.conversations.utils.ThemeHelper
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.InputStream
|
||||
import java.io.OutputStream
|
||||
import java.io.*
|
||||
import java.lang.Float.max
|
||||
import java.util.UUID
|
||||
|
||||
|
|
|
@ -13,16 +13,7 @@ import androidx.appcompat.app.AlertDialog
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.siacs.conversations.R
|
||||
import eu.siacs.conversations.databinding.DialogColorPickerBinding
|
||||
import eu.siacs.conversations.medialib.extensions.beVisible
|
||||
import eu.siacs.conversations.medialib.extensions.config
|
||||
import eu.siacs.conversations.medialib.extensions.copyToClipboard
|
||||
import eu.siacs.conversations.medialib.extensions.isQPlus
|
||||
import eu.siacs.conversations.medialib.extensions.onGlobalLayout
|
||||
import eu.siacs.conversations.medialib.extensions.onTextChangeListener
|
||||
import eu.siacs.conversations.medialib.extensions.setFillWithStroke
|
||||
import eu.siacs.conversations.medialib.extensions.setupDialogStuff
|
||||
import eu.siacs.conversations.medialib.extensions.toHex
|
||||
import eu.siacs.conversations.medialib.extensions.value
|
||||
import eu.siacs.conversations.medialib.extensions.*
|
||||
import eu.siacs.conversations.medialib.views.ColorPickerSquare
|
||||
import java.util.LinkedList
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package eu.siacs.conversations.medialib.dialogs
|
|||
import android.app.Activity
|
||||
import android.widget.EditText
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.siacs.conversations.R
|
||||
import eu.siacs.conversations.databinding.DialogCustomAspectRatioBinding
|
||||
|
|
|
@ -7,11 +7,7 @@ import androidx.appcompat.app.AlertDialog
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder
|
||||
import eu.siacs.conversations.R
|
||||
import eu.siacs.conversations.databinding.DialogResizeImageBinding
|
||||
import eu.siacs.conversations.medialib.extensions.onTextChangeListener
|
||||
import eu.siacs.conversations.medialib.extensions.setupDialogStuff
|
||||
import eu.siacs.conversations.medialib.extensions.showKeyboard
|
||||
import eu.siacs.conversations.medialib.extensions.toast
|
||||
import eu.siacs.conversations.medialib.extensions.value
|
||||
import eu.siacs.conversations.medialib.extensions.*
|
||||
|
||||
class ResizeDialog(val activity: Activity, val size: Point, val callback: (newSize: Point) -> Unit) {
|
||||
init {
|
||||
|
|
|
@ -3,6 +3,11 @@ package eu.siacs.conversations.medialib.extensions
|
|||
import android.app.Activity
|
||||
import android.view.View
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import eu.siacs.conversations.R
|
||||
import eu.siacs.conversations.medialib.models.FileDirItem
|
||||
import java.io.File
|
||||
import java.io.FileNotFoundException
|
||||
import java.io.OutputStream
|
||||
|
||||
fun Activity.setupDialogStuff(
|
||||
view: View,
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package eu.siacs.conversations.medialib.extensions
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.ContentUris
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
import android.content.*
|
||||
import android.media.MediaScannerConnection
|
||||
import android.net.Uri
|
||||
import android.os.Environment
|
||||
|
@ -19,8 +15,8 @@ import eu.siacs.conversations.R
|
|||
import eu.siacs.conversations.medialib.helpers.Config
|
||||
import java.io.File
|
||||
import java.text.SimpleDateFormat
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import java.util.*
|
||||
import java.util.regex.Pattern
|
||||
|
||||
val Context.config: Config get() = Config.newInstance(applicationContext)
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
package eu.siacs.conversations.medialib.extensions
|
||||
|
||||
import android.text.Editable
|
||||
import android.text.Spannable
|
||||
import android.text.SpannableString
|
||||
import android.text.TextWatcher
|
||||
import android.text.style.BackgroundColorSpan
|
||||
import android.widget.EditText
|
||||
import android.widget.TextView
|
||||
import androidx.core.graphics.ColorUtils
|
||||
|
||||
val EditText.value: String get() = text.toString().trim()
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package eu.siacs.conversations.medialib.extensions
|
||||
|
||||
import android.view.HapticFeedbackConstants
|
||||
import android.view.View
|
||||
import android.view.ViewTreeObserver
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package eu.siacs.conversations.medialib.helpers
|
|||
import android.content.Context
|
||||
import android.graphics.Color
|
||||
import eu.siacs.conversations.R
|
||||
import java.util.LinkedList
|
||||
import java.util.*
|
||||
|
||||
class Config(private val context: Context) {
|
||||
protected val prefs = context.getSharedPreferences("media_config_prefs", Context.MODE_PRIVATE)
|
||||
|
|
|
@ -2,6 +2,7 @@ package eu.siacs.conversations.medialib.helpers
|
|||
|
||||
import android.graphics.Bitmap
|
||||
import eu.siacs.conversations.medialib.models.FilterItem
|
||||
import java.util.*
|
||||
|
||||
class FilterThumbnailsManager {
|
||||
private var filterThumbnails = ArrayList<FilterItem>(10)
|
||||
|
|
|
@ -2,13 +2,7 @@ package eu.siacs.conversations.medialib.views
|
|||
|
||||
import android.annotation.SuppressLint
|
||||
import android.content.Context
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.ComposeShader
|
||||
import android.graphics.LinearGradient
|
||||
import android.graphics.Paint
|
||||
import android.graphics.PorterDuff
|
||||
import android.graphics.Shader
|
||||
import android.graphics.*
|
||||
import android.graphics.Shader.TileMode
|
||||
import android.util.AttributeSet
|
||||
import android.view.View
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package eu.siacs.conversations.medialib.views
|
||||
|
||||
import android.content.Context
|
||||
import android.graphics.Bitmap
|
||||
import android.graphics.Canvas
|
||||
import android.graphics.Color
|
||||
import android.graphics.Paint
|
||||
import android.graphics.Path
|
||||
import android.graphics.*
|
||||
import android.util.AttributeSet
|
||||
import android.view.MotionEvent
|
||||
import android.view.View
|
||||
|
|
|
@ -2,11 +2,6 @@ package eu.siacs.conversations.parser;
|
|||
|
||||
import android.util.Log;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.crypto.PgpEngine;
|
||||
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
|
||||
|
@ -28,6 +23,11 @@ import eu.siacs.conversations.xmpp.OnPresencePacketReceived;
|
|||
import eu.siacs.conversations.xmpp.pep.Avatar;
|
||||
import eu.siacs.conversations.xmpp.stanzas.PresencePacket;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class PresenceParser extends AbstractParser implements OnPresencePacketReceived {
|
||||
|
||||
public PresenceParser(XmppConnectionService service) {
|
||||
|
|
|
@ -34,6 +34,7 @@ import java.security.cert.CertificateException;
|
|||
import java.security.cert.CertificateFactory;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.siacs.conversations.services;
|
||||
|
||||
import static eu.siacs.conversations.entities.Transferable.VALID_CRYPTO_EXTENSIONS;
|
||||
|
||||
import android.content.Context;
|
||||
import android.net.ConnectivityManager;
|
||||
import android.net.Network;
|
||||
|
@ -41,6 +39,8 @@ import okio.BufferedSink;
|
|||
import okio.Okio;
|
||||
import okio.Source;
|
||||
|
||||
import static eu.siacs.conversations.entities.Transferable.VALID_CRYPTO_EXTENSIONS;
|
||||
|
||||
public class AbstractConnectionManager {
|
||||
|
||||
private static final int UI_REFRESH_THRESHOLD = 250;
|
||||
|
|
|
@ -7,10 +7,10 @@ import android.content.pm.PackageManager;
|
|||
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import eu.siacs.conversations.BuildConfig;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
public abstract class AbstractQuickConversationsService {
|
||||
|
||||
public static final String SMS_RETRIEVED_ACTION =
|
||||
|
|
|
@ -24,6 +24,10 @@ import androidx.core.content.ContextCompat;
|
|||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.utils.AppRTCUtils;
|
||||
import eu.siacs.conversations.xmpp.jingle.JingleConnectionManager;
|
||||
|
||||
import org.webrtc.ThreadUtils;
|
||||
|
||||
import java.util.HashSet;
|
||||
|
@ -31,10 +35,6 @@ import java.util.Set;
|
|||
import java.util.concurrent.ScheduledFuture;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.utils.AppRTCUtils;
|
||||
import eu.siacs.conversations.xmpp.jingle.JingleConnectionManager;
|
||||
|
||||
/** AppRTCAudioManager manages all audio related parts of the AppRTC demo. */
|
||||
public class AppRTCAudioManager {
|
||||
|
||||
|
|
|
@ -20,13 +20,6 @@ import com.google.common.collect.ImmutableSet;
|
|||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.ui.util.MainThreadExecutor;
|
||||
|
@ -34,6 +27,13 @@ import eu.siacs.conversations.xmpp.Jid;
|
|||
import eu.siacs.conversations.xmpp.jingle.JingleConnectionManager;
|
||||
import eu.siacs.conversations.xmpp.jingle.Media;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class CallIntegration extends Connection {
|
||||
|
||||
private static final List<String> BROKEN_DEVICE_MODELS =
|
||||
|
|
|
@ -28,17 +28,6 @@ import com.google.common.collect.ImmutableSet;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.SettableFuture;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
@ -51,6 +40,17 @@ import eu.siacs.conversations.xmpp.jingle.Media;
|
|||
import eu.siacs.conversations.xmpp.jingle.RtpEndUserState;
|
||||
import eu.siacs.conversations.xmpp.jingle.stanzas.Reason;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
|
||||
public class CallIntegrationConnectionService extends ConnectionService {
|
||||
|
||||
private static final String EXTRA_ADDRESS = "eu.siacs.conversations.address";
|
||||
|
|
|
@ -11,6 +11,28 @@ import com.google.common.base.Strings;
|
|||
import com.google.common.cache.Cache;
|
||||
import com.google.common.cache.CacheBuilder;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.crypto.TrustManagers;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Room;
|
||||
import eu.siacs.conversations.http.HttpConnectionManager;
|
||||
import eu.siacs.conversations.http.services.MuclumbusService;
|
||||
import eu.siacs.conversations.parser.IqParser;
|
||||
import eu.siacs.conversations.utils.TLSSocketFactory;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
|
||||
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.ResponseBody;
|
||||
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.KeyStoreException;
|
||||
|
@ -28,26 +50,6 @@ import java.util.concurrent.atomic.AtomicInteger;
|
|||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.crypto.TrustManagers;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Room;
|
||||
import eu.siacs.conversations.http.HttpConnectionManager;
|
||||
import eu.siacs.conversations.http.services.MuclumbusService;
|
||||
import eu.siacs.conversations.parser.IqParser;
|
||||
import eu.siacs.conversations.utils.TLSSocketFactory;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
|
||||
import eu.siacs.conversations.xmpp.XmppConnection;
|
||||
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Callback;
|
||||
import retrofit2.Response;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
|
||||
public class ChannelDiscoveryService {
|
||||
|
||||
private final XmppConnectionService service;
|
||||
|
|
|
@ -48,6 +48,17 @@ import com.google.common.base.Preconditions;
|
|||
import com.google.common.io.ByteStreams;
|
||||
import com.google.common.io.CharStreams;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.BundledTrustManager;
|
||||
import eu.siacs.conversations.crypto.CombiningTrustManager;
|
||||
import eu.siacs.conversations.crypto.TrustManagers;
|
||||
import eu.siacs.conversations.crypto.XmppDomainVerifier;
|
||||
import eu.siacs.conversations.entities.MTMDecision;
|
||||
import eu.siacs.conversations.http.HttpConnectionManager;
|
||||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
import eu.siacs.conversations.ui.MemorizingActivity;
|
||||
|
||||
import org.json.JSONArray;
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
|
@ -80,15 +91,6 @@ import javax.net.ssl.TrustManager;
|
|||
import javax.net.ssl.TrustManagerFactory;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.TrustManagers;
|
||||
import eu.siacs.conversations.crypto.XmppDomainVerifier;
|
||||
import eu.siacs.conversations.entities.MTMDecision;
|
||||
import eu.siacs.conversations.http.HttpConnectionManager;
|
||||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
import eu.siacs.conversations.ui.MemorizingActivity;
|
||||
|
||||
/**
|
||||
* A X509 trust manager implementation which asks the user about invalid certificates and memorizes
|
||||
* their decision.
|
||||
|
|
|
@ -42,6 +42,7 @@ import androidx.core.content.ContextCompat;
|
|||
import androidx.core.content.pm.ShortcutInfoCompat;
|
||||
import androidx.core.graphics.drawable.IconCompat;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
import com.google.common.base.Joiner;
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Splitter;
|
||||
|
@ -50,21 +51,6 @@ import com.google.common.collect.ImmutableMap;
|
|||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
|
@ -87,6 +73,21 @@ import eu.siacs.conversations.xmpp.XmppConnection;
|
|||
import eu.siacs.conversations.xmpp.jingle.AbstractJingleConnection;
|
||||
import eu.siacs.conversations.xmpp.jingle.Media;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class NotificationService {
|
||||
|
||||
public static final Object CATCHUP_LOCK = new Object();
|
||||
|
|
|
@ -11,6 +11,7 @@ import android.os.Build;
|
|||
import android.util.Log;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
import androidx.core.content.pm.ShortcutInfoCompat;
|
||||
import androidx.core.graphics.drawable.IconCompat;
|
||||
|
||||
|
|
|
@ -23,13 +23,6 @@ import com.google.common.util.concurrent.Futures;
|
|||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.MoreExecutors;
|
||||
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
@ -41,6 +34,12 @@ import eu.siacs.conversations.xml.Namespace;
|
|||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
|
||||
import eu.siacs.conversations.xmpp.stanzas.PresencePacket;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class UnifiedPushBroker {
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import static eu.siacs.conversations.ui.XmppActivity.configureActionBar;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
@ -10,6 +8,8 @@ import eu.siacs.conversations.R;
|
|||
import eu.siacs.conversations.ui.util.SettingsUtils;
|
||||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
|
||||
import static eu.siacs.conversations.ui.XmppActivity.configureActionBar;
|
||||
|
||||
public class AboutActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -9,6 +9,7 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TextView;
|
||||
|
|
|
@ -5,7 +5,6 @@ import android.content.Context;
|
|||
import android.content.res.Configuration;
|
||||
import android.os.Build;
|
||||
import android.view.View;
|
||||
|
||||
import com.google.android.material.elevation.SurfaceColors;
|
||||
|
||||
public final class Activities {
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.view.View;
|
|||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
|
|
@ -7,14 +7,14 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityManageAccountsBinding;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.ui.adapter.AccountAdapter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ChooseAccountForProfilePictureActivity extends XmppActivity {
|
||||
|
||||
protected final List<Account> accountList = new ArrayList<>();
|
||||
|
|
|
@ -32,6 +32,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Contact;
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import static eu.siacs.conversations.entities.Bookmark.printableValue;
|
||||
import static eu.siacs.conversations.utils.StringUtils.changed;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Context;
|
||||
|
@ -32,6 +29,7 @@ import java.util.Map;
|
|||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityMucDetailsBinding;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
@ -64,6 +62,9 @@ import eu.siacs.conversations.utils.XmppUri;
|
|||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import me.drakeet.support.toast.ToastCompat;
|
||||
|
||||
import static eu.siacs.conversations.entities.Bookmark.printableValue;
|
||||
import static eu.siacs.conversations.utils.StringUtils.changed;
|
||||
|
||||
public class ConferenceDetailsActivity extends XmppActivity implements OnConversationUpdate, OnMucRosterUpdate, XmppConnectionService.OnAffiliationChanged, XmppConnectionService.OnConfigurationPushed, XmppConnectionService.OnRoomDestroy, TextWatcher, OnMediaLoaded {
|
||||
public static final String ACTION_VIEW_MUC = "view_muc";
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.content.DialogInterface;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
|
@ -18,12 +19,14 @@ import android.provider.ContactsContract.Intents;
|
|||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.style.RelativeSizeSpan;
|
||||
import android.util.TypedValue;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.CompoundButton.OnCheckedChangeListener;
|
||||
|
@ -38,6 +41,7 @@ import androidx.core.view.ViewCompat;
|
|||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
|
@ -51,6 +55,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
|
||||
|
@ -82,6 +87,7 @@ import eu.siacs.conversations.utils.PhoneNumberUtilWrapper;
|
|||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import eu.siacs.conversations.utils.XEP0392Helper;
|
||||
import eu.siacs.conversations.utils.XmppUri;
|
||||
import eu.siacs.conversations.xml.Element;
|
||||
import eu.siacs.conversations.xml.Namespace;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
|
||||
|
|
|
@ -6,6 +6,8 @@ import android.os.Bundle;
|
|||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
import eu.siacs.conversations.ui.util.SettingsUtils;
|
||||
|
||||
public class ConversationActivity extends AppCompatActivity {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,6 +18,8 @@ import android.app.FragmentManager;
|
|||
import android.app.PendingIntent;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.ActivityNotFoundException;
|
||||
import android.content.ContentResolver;
|
||||
import android.content.ContentValues;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
|
@ -25,9 +27,11 @@ import android.content.IntentSender.SendIntentException;
|
|||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.os.Handler;
|
||||
import android.os.SystemClock;
|
||||
import android.os.VibrationEffect;
|
||||
|
@ -78,6 +82,9 @@ import androidx.viewpager.widget.PagerAdapter;
|
|||
import com.google.common.base.Optional;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.net.URL;
|
||||
import java.util.AbstractMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -86,6 +93,7 @@ import java.util.Collections;
|
|||
import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -161,6 +169,19 @@ import eu.siacs.conversations.xmpp.jingle.Media;
|
|||
import eu.siacs.conversations.xmpp.jingle.OngoingRtpSession;
|
||||
import eu.siacs.conversations.xmpp.jingle.RtpCapability;
|
||||
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
|
||||
import eu.siacs.conversations.xmpp.jingle.RtpEndUserState;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class ConversationFragment extends XmppFragment
|
||||
implements EditMessage.KeyboardListener,
|
||||
|
|
|
@ -69,6 +69,7 @@ import java.util.Arrays;
|
|||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.Objects;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
|
||||
package eu.siacs.conversations.ui;
|
||||
|
||||
import static androidx.recyclerview.widget.ItemTouchHelper.LEFT;
|
||||
import static androidx.recyclerview.widget.ItemTouchHelper.RIGHT;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Fragment;
|
||||
|
@ -60,6 +57,7 @@ import com.google.common.base.Optional;
|
|||
import com.google.common.collect.Collections2;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -76,8 +74,9 @@ import eu.siacs.conversations.entities.Contact;
|
|||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.entities.Conversational;
|
||||
import eu.siacs.conversations.entities.ListItem;
|
||||
import eu.siacs.conversations.services.QuickConversationsService;
|
||||
import eu.siacs.conversations.entities.Presence;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.services.QuickConversationsService;
|
||||
import eu.siacs.conversations.ui.adapter.ConversationAdapter;
|
||||
import eu.siacs.conversations.ui.interfaces.OnConversationArchived;
|
||||
import eu.siacs.conversations.ui.interfaces.OnConversationSelected;
|
||||
|
@ -92,6 +91,9 @@ import eu.siacs.conversations.utils.EasyOnboardingInvite;
|
|||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
import eu.siacs.conversations.xmpp.jingle.OngoingRtpSession;
|
||||
|
||||
import static androidx.recyclerview.widget.ItemTouchHelper.LEFT;
|
||||
import static androidx.recyclerview.widget.ItemTouchHelper.RIGHT;
|
||||
|
||||
public class ConversationsOverviewFragment extends XmppFragment {
|
||||
|
||||
private static final String STATE_SCROLL_POSITION = ConversationsOverviewFragment.class.getName()+".scroll_state";
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.os.Bundle;
|
|||
import android.widget.AutoCompleteTextView;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
|
||||
|
|
|
@ -41,13 +41,6 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import com.google.common.base.CharMatcher;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
|
@ -85,8 +78,16 @@ import eu.siacs.conversations.xmpp.XmppConnection;
|
|||
import eu.siacs.conversations.xmpp.XmppConnection.Features;
|
||||
import eu.siacs.conversations.xmpp.forms.Data;
|
||||
import eu.siacs.conversations.xmpp.pep.Avatar;
|
||||
|
||||
import okhttp3.HttpUrl;
|
||||
|
||||
import org.openintents.openpgp.util.OpenPgpUtils;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
|
||||
public class EditAccountActivity extends OmemoActivity implements OnAccountUpdate, OnUpdateBlocklist,
|
||||
OnKeyStatusUpdated, OnCaptchaRequested, KeyChainAliasCallback, XmppConnectionService.OnShowErrorToast, XmppConnectionService.OnMamPreferencesFetched {
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@ package eu.siacs.conversations.ui;
|
|||
|
||||
import android.app.Activity;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface.OnClickListener;
|
||||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.text.Editable;
|
||||
import android.text.InputType;
|
||||
|
@ -12,14 +14,15 @@ import android.view.View;
|
|||
import android.view.ViewGroup;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.TextView;
|
||||
import android.widget.ToggleButton;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.fragment.app.DialogFragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
@ -28,20 +31,21 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import io.michaelrocks.libphonenumber.android.NumberParseException;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.DialogEnterJidBinding;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Contact;
|
||||
import eu.siacs.conversations.entities.Presence;
|
||||
import eu.siacs.conversations.entities.ServiceDiscoveryResult;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.ui.adapter.KnownHostsAdapter;
|
||||
import eu.siacs.conversations.ui.interfaces.OnBackendConnected;
|
||||
import eu.siacs.conversations.ui.util.DelayedHintHelper;
|
||||
import eu.siacs.conversations.utils.PhoneNumberUtilWrapper;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.OnGatewayResult;
|
||||
import io.michaelrocks.libphonenumber.android.NumberParseException;
|
||||
|
||||
public class EnterJidDialog extends DialogFragment implements OnBackendConnected, TextWatcher {
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package eu.siacs.conversations.ui;
|
|||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton;
|
||||
|
||||
public class ExtendedFabSizeChanger extends RecyclerView.OnScrollListener {
|
||||
|
|
|
@ -6,6 +6,7 @@ import android.content.Context;
|
|||
import android.content.DialogInterface;
|
||||
import android.os.Bundle;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.Spinner;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.TargetApi;
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
|
@ -9,6 +10,7 @@ import android.graphics.BitmapFactory;
|
|||
import android.location.Location;
|
||||
import android.location.LocationListener;
|
||||
import android.location.LocationManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.provider.Settings;
|
||||
|
@ -37,6 +39,7 @@ import eu.siacs.conversations.services.QuickConversationsService;
|
|||
import eu.siacs.conversations.ui.util.LocationHelper;
|
||||
import eu.siacs.conversations.ui.widget.Marker;
|
||||
import eu.siacs.conversations.ui.widget.MyLocation;
|
||||
import eu.siacs.conversations.ui.util.SettingsUtils;
|
||||
|
||||
public abstract class LocationActivity extends ActionBarActivity implements LocationListener {
|
||||
protected LocationManager locationManager;
|
||||
|
|
|
@ -17,9 +17,11 @@ import androidx.annotation.NonNull;
|
|||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.common.collect.Collections2;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Ordering;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Locale;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
|
|
|
@ -8,6 +8,7 @@ import android.widget.CompoundButton;
|
|||
import android.widget.LinearLayout;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
|
|
|
@ -29,8 +29,6 @@
|
|||
|
||||
package eu.siacs.conversations.ui;
|
||||
|
||||
import static eu.siacs.conversations.ui.PublishProfilePictureActivity.REQUEST_CHOOSE_PICTURE;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.graphics.Bitmap;
|
||||
import android.net.Uri;
|
||||
|
@ -42,8 +40,6 @@ import android.widget.Toast;
|
|||
import androidx.annotation.StringRes;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.canhub.cropper.CropImage;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityPublishProfilePictureBinding;
|
||||
|
@ -51,6 +47,10 @@ import eu.siacs.conversations.entities.Conversation;
|
|||
import eu.siacs.conversations.ui.interfaces.OnAvatarPublication;
|
||||
import eu.siacs.conversations.ui.util.PendingItem;
|
||||
|
||||
import static eu.siacs.conversations.ui.PublishProfilePictureActivity.REQUEST_CHOOSE_PICTURE;
|
||||
|
||||
import com.canhub.cropper.CropImage;
|
||||
|
||||
public class PublishGroupChatProfilePictureActivity extends XmppActivity implements OnAvatarPublication {
|
||||
private final PendingItem<String> pendingConversationUuid = new PendingItem<>();
|
||||
private ActivityPublishProfilePictureBinding binding;
|
||||
|
|
|
@ -23,13 +23,14 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Set;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityRecordingBinding;
|
||||
import eu.siacs.conversations.ui.util.SettingsUtils;
|
||||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
import eu.siacs.conversations.utils.TimeFrameUtils;
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
import static eu.siacs.conversations.utils.PermissionUtils.getFirstDenied;
|
||||
|
||||
import static java.util.Arrays.asList;
|
||||
|
||||
import android.Manifest;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.PictureInPictureParams;
|
||||
|
@ -58,6 +59,7 @@ import eu.siacs.conversations.entities.Conversation;
|
|||
import eu.siacs.conversations.services.CallIntegration;
|
||||
import eu.siacs.conversations.services.CallIntegrationConnectionService;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.ui.widget.DialpadView;
|
||||
import eu.siacs.conversations.ui.util.AvatarWorkerTask;
|
||||
import eu.siacs.conversations.ui.util.MainThreadExecutor;
|
||||
import eu.siacs.conversations.ui.util.Rationals;
|
||||
|
@ -73,6 +75,16 @@ import eu.siacs.conversations.xmpp.jingle.OngoingRtpSession;
|
|||
import eu.siacs.conversations.xmpp.jingle.RtpCapability;
|
||||
import eu.siacs.conversations.xmpp.jingle.RtpEndUserState;
|
||||
|
||||
import org.webrtc.RendererCommon;
|
||||
import org.webrtc.SurfaceViewRenderer;
|
||||
import org.webrtc.VideoTrack;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
public class RtpSessionActivity extends XmppActivity
|
||||
implements XmppConnectionService.OnJingleRtpConnectionUpdate,
|
||||
eu.siacs.conversations.ui.widget.SurfaceViewRenderer.OnAspectRatioChanged {
|
||||
|
|
|
@ -61,6 +61,7 @@ import java.util.Map;
|
|||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.ui.service.CameraManager;
|
||||
import eu.siacs.conversations.ui.util.SettingsUtils;
|
||||
import eu.siacs.conversations.ui.widget.ScannerView;
|
||||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
|
||||
package eu.siacs.conversations.ui;
|
||||
|
||||
import static eu.siacs.conversations.ui.util.SoftKeyboardUtils.hideSoftKeyboard;
|
||||
import static eu.siacs.conversations.ui.util.SoftKeyboardUtils.showKeyboard;
|
||||
|
||||
import android.app.PendingIntent;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
|
@ -47,6 +44,7 @@ import android.widget.AdapterView;
|
|||
import android.widget.EditText;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
|
@ -73,6 +71,10 @@ import eu.siacs.conversations.ui.util.PendingItem;
|
|||
import eu.siacs.conversations.ui.util.ShareUtil;
|
||||
import eu.siacs.conversations.utils.FtsUtils;
|
||||
import eu.siacs.conversations.utils.MessageUtils;
|
||||
import eu.siacs.conversations.utils.UIHelper;
|
||||
|
||||
import static eu.siacs.conversations.ui.util.SoftKeyboardUtils.hideSoftKeyboard;
|
||||
import static eu.siacs.conversations.ui.util.SoftKeyboardUtils.showKeyboard;
|
||||
|
||||
public class SearchActivity extends XmppActivity implements TextWatcher, OnSearchResultsAvailable, MessageAdapter.OnContactPictureClicked {
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ import java.util.regex.Pattern;
|
|||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.services.BarcodeProvider;
|
||||
|
||||
public class SendLogActivity extends ActionBarActivity {
|
||||
public final static String TAG = "com.xtralogic.android.logcollector";
|
||||
|
|
|
@ -14,11 +14,6 @@ import androidx.databinding.DataBindingUtil;
|
|||
import com.google.android.material.snackbar.Snackbar;
|
||||
import com.google.common.math.DoubleMath;
|
||||
|
||||
import org.osmdroid.api.IGeoPoint;
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
||||
import java.math.RoundingMode;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityShareLocationBinding;
|
||||
|
@ -27,6 +22,11 @@ import eu.siacs.conversations.ui.widget.Marker;
|
|||
import eu.siacs.conversations.ui.widget.MyLocation;
|
||||
import eu.siacs.conversations.utils.LocationProvider;
|
||||
|
||||
import org.osmdroid.api.IGeoPoint;
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
||||
import java.math.RoundingMode;
|
||||
|
||||
public class ShareLocationActivity extends LocationActivity implements LocationListener {
|
||||
|
||||
private Snackbar snackBar;
|
||||
|
|
|
@ -12,6 +12,7 @@ import android.widget.Toast;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
|
@ -31,6 +32,9 @@ import eu.siacs.conversations.services.XmppConnectionService;
|
|||
import eu.siacs.conversations.ui.adapter.ConversationAdapter;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ShareWithActivity extends XmppActivity
|
||||
implements XmppConnectionService.OnConversationUpdate {
|
||||
|
||||
|
|
|
@ -21,10 +21,6 @@ import androidx.databinding.DataBindingUtil;
|
|||
import com.google.common.base.Strings;
|
||||
import com.google.common.primitives.Doubles;
|
||||
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityShowLocationBinding;
|
||||
|
@ -35,6 +31,10 @@ import eu.siacs.conversations.ui.widget.MyLocation;
|
|||
import eu.siacs.conversations.utils.GeoHelper;
|
||||
import eu.siacs.conversations.utils.LocationProvider;
|
||||
|
||||
import org.osmdroid.util.GeoPoint;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class ShowLocationActivity extends LocationActivity implements LocationListener {
|
||||
|
||||
private GeoPoint loc = LocationProvider.FALLBACK;
|
||||
|
|
|
@ -9,7 +9,11 @@ import android.content.Context;
|
|||
import android.content.Intent;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.res.Resources;
|
||||
import android.database.DataSetObserver;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
@ -21,6 +25,7 @@ import android.text.method.LinkMovementMethod;
|
|||
import android.util.AttributeSet;
|
||||
import android.util.Log;
|
||||
import android.util.Pair;
|
||||
import android.util.TypedValue;
|
||||
import android.view.ContextMenu;
|
||||
import android.view.ContextMenu.ContextMenuInfo;
|
||||
import android.view.KeyEvent;
|
||||
|
@ -29,6 +34,7 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewParent;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.AdapterView;
|
||||
import android.widget.AdapterView.AdapterContextMenuInfo;
|
||||
|
@ -41,6 +47,8 @@ import android.widget.ExpandableListView;
|
|||
import android.widget.FrameLayout;
|
||||
import android.widget.ListAdapter;
|
||||
import android.widget.ListView;
|
||||
import android.widget.Space;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
|
@ -63,6 +71,7 @@ import androidx.viewpager.widget.PagerAdapter;
|
|||
import androidx.viewpager.widget.ViewPager;
|
||||
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.leinardi.android.speeddial.SpeedDialActionItem;
|
||||
import com.leinardi.android.speeddial.SpeedDialView;
|
||||
|
||||
|
@ -77,6 +86,7 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import eu.siacs.conversations.BuildConfig;
|
||||
|
@ -102,6 +112,7 @@ import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
|
|||
import eu.siacs.conversations.ui.util.StyledAttributes;
|
||||
import eu.siacs.conversations.ui.widget.SwipeRefreshListFragment;
|
||||
import eu.siacs.conversations.utils.AccountUtils;
|
||||
import eu.siacs.conversations.utils.StringUtils;
|
||||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import eu.siacs.conversations.utils.XmppUri;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package eu.siacs.conversations.ui;
|
||||
|
||||
import android.app.AlertDialog;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
@ -15,15 +16,6 @@ import androidx.databinding.DataBindingUtil;
|
|||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.whispersystems.libsignal.IdentityKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.OmemoSetting;
|
||||
|
@ -41,6 +33,15 @@ import eu.siacs.conversations.utils.XmppUri;
|
|||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
|
||||
|
||||
import org.whispersystems.libsignal.IdentityKey;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
public class TrustKeysActivity extends OmemoActivity implements OnKeyStatusUpdated {
|
||||
private final Map<String, Boolean> ownKeysToTrust = new HashMap<>();
|
||||
private final Map<Jid, Map<String, Boolean>> foreignKeysToTrust = new HashMap<>();
|
||||
|
|
|
@ -18,11 +18,6 @@ import androidx.databinding.DataBindingUtil;
|
|||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivityUriHandlerBinding;
|
||||
|
@ -34,12 +29,18 @@ import eu.siacs.conversations.utils.SignupUtils;
|
|||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
import eu.siacs.conversations.utils.XmppUri;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import okhttp3.Call;
|
||||
import okhttp3.Callback;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class UriHandlerActivity extends BaseActivity {
|
||||
|
||||
public static final String ACTION_SCAN_QR_CODE = "scan_qr_code";
|
||||
|
|
|
@ -16,6 +16,7 @@ import android.content.ServiceConnection;
|
|||
import android.content.SharedPreferences;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Point;
|
||||
|
@ -83,12 +84,19 @@ import eu.siacs.conversations.ui.util.SettingsUtils;
|
|||
import eu.siacs.conversations.ui.util.SoftKeyboardUtils;
|
||||
import eu.siacs.conversations.utils.AccountUtils;
|
||||
import eu.siacs.conversations.utils.Compatibility;
|
||||
import eu.siacs.conversations.utils.ExceptionHelper;
|
||||
import eu.siacs.conversations.utils.SignupUtils;
|
||||
import eu.siacs.conversations.utils.ThemeHelper;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
|
||||
import eu.siacs.conversations.xmpp.OnUpdateBlocklist;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
public abstract class XmppActivity extends ActionBarActivity {
|
||||
|
||||
public static final String EXTRA_ACCOUNT = "account";
|
||||
|
|
|
@ -8,8 +8,6 @@ import androidx.preference.PreferenceFragmentCompat;
|
|||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ActivitySettingsBinding;
|
||||
import eu.siacs.conversations.ui.Activities;
|
||||
|
@ -18,6 +16,8 @@ import eu.siacs.conversations.ui.fragment.settings.MainSettingsFragment;
|
|||
import eu.siacs.conversations.ui.fragment.settings.NotificationsSettingsFragment;
|
||||
import eu.siacs.conversations.ui.fragment.settings.XmppPreferenceFragment;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
public class SettingsActivity extends XmppActivity {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -10,14 +10,15 @@ import androidx.databinding.DataBindingUtil;
|
|||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ItemAccountBinding;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.ui.XmppActivity;
|
||||
import eu.siacs.conversations.ui.util.AvatarWorkerTask;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class AccountAdapter extends ArrayAdapter<Account> {
|
||||
|
||||
private final XmppActivity activity;
|
||||
|
|
|
@ -13,8 +13,6 @@ import androidx.recyclerview.widget.DiffUtil;
|
|||
import androidx.recyclerview.widget.ListAdapter;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ItemChannelDiscoveryBinding;
|
||||
import eu.siacs.conversations.entities.Room;
|
||||
|
@ -22,6 +20,8 @@ import eu.siacs.conversations.ui.XmppActivity;
|
|||
import eu.siacs.conversations.ui.util.AvatarWorkerTask;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
public class ChannelSearchResultAdapter extends ListAdapter<Room, ChannelSearchResultAdapter.ViewHolder> implements View.OnCreateContextMenuListener {
|
||||
|
||||
private static final DiffUtil.ItemCallback<Room> DIFF = new DiffUtil.ItemCallback<>() {
|
||||
|
|
|
@ -2,6 +2,8 @@ package eu.siacs.conversations.ui.adapter;
|
|||
|
||||
import android.content.Context;
|
||||
import android.content.SharedPreferences;
|
||||
import android.content.res.TypedArray;
|
||||
import android.database.DataSetObserver;
|
||||
import android.content.res.ColorStateList;
|
||||
import android.graphics.Typeface;
|
||||
import android.preference.PreferenceManager;
|
||||
|
@ -19,6 +21,9 @@ import androidx.databinding.DataBindingUtil;
|
|||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import org.checkerframework.checker.units.qual.C;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -30,8 +35,9 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ItemConversationBinding;
|
||||
import eu.siacs.conversations.databinding.ConversationListRowBinding;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.databinding.ItemConversationBinding;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.entities.Conversational;
|
||||
import eu.siacs.conversations.entities.ListItem;
|
||||
|
@ -45,6 +51,8 @@ import eu.siacs.conversations.utils.UIHelper;
|
|||
import eu.siacs.conversations.xmpp.Jid;
|
||||
import eu.siacs.conversations.xmpp.jingle.OngoingRtpSession;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ConversationAdapter
|
||||
extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
|
||||
|
||||
|
|
|
@ -9,14 +9,14 @@ import androidx.annotation.NonNull;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Ordering;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
||||
public class KnownHostsAdapter extends ArrayAdapter<String> {
|
||||
|
||||
private static final Pattern E164_PATTERN = Pattern.compile("^\\+[1-9]\\d{1,14}$");
|
||||
|
|
|
@ -22,8 +22,6 @@ import com.google.android.material.color.MaterialColors;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
|
@ -38,6 +36,8 @@ import eu.siacs.conversations.utils.UIHelper;
|
|||
import eu.siacs.conversations.utils.XEP0392Helper;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ListItemAdapter extends ArrayAdapter<ListItem> {
|
||||
|
||||
protected XmppActivity activity;
|
||||
|
|
|
@ -21,12 +21,6 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||
import com.google.android.material.color.MaterialColors;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ItemMediaBinding;
|
||||
import eu.siacs.conversations.ui.XmppActivity;
|
||||
|
@ -34,6 +28,12 @@ import eu.siacs.conversations.ui.util.Attachment;
|
|||
import eu.siacs.conversations.ui.util.ViewUtil;
|
||||
import eu.siacs.conversations.worker.ExportBackupWorker;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
public class MediaAdapter extends RecyclerView.Adapter<MediaAdapter.MediaViewHolder> {
|
||||
|
||||
public static final List<String> DOCUMENT_MIMES =
|
||||
|
|
|
@ -9,7 +9,9 @@ import android.graphics.drawable.BitmapDrawable;
|
|||
import android.graphics.drawable.Drawable;
|
||||
import android.net.Uri;
|
||||
import android.os.AsyncTask;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.Toast;
|
||||
|
@ -20,11 +22,11 @@ import androidx.core.widget.ImageViewCompat;
|
|||
import androidx.databinding.DataBindingUtil;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.databinding.ItemMediaPreviewBinding;
|
||||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
|
@ -33,6 +35,12 @@ import eu.siacs.conversations.ui.ShowLocationActivity;
|
|||
import eu.siacs.conversations.ui.XmppActivity;
|
||||
import eu.siacs.conversations.ui.util.Attachment;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.RejectedExecutionException;
|
||||
|
||||
public class MediaPreviewAdapter
|
||||
extends RecyclerView.Adapter<MediaPreviewAdapter.MediaPreviewViewHolder> {
|
||||
|
||||
|
|
|
@ -27,13 +27,13 @@ import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|||
import com.google.common.base.Strings;
|
||||
import com.google.common.primitives.Longs;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
import eu.siacs.conversations.worker.ExportBackupWorker;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class BackupSettingsFragment extends XmppPreferenceFragment {
|
||||
|
||||
public static final String CREATE_ONE_OFF_BACKUP = "create_one_off_backup";
|
||||
|
|
|
@ -13,15 +13,15 @@ import androidx.preference.Preference;
|
|||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import java.security.KeyStoreException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.OmemoSetting;
|
||||
import eu.siacs.conversations.services.MemorizingTrustManager;
|
||||
|
||||
import java.security.KeyStoreException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
||||
public class SecuritySettingsFragment extends XmppPreferenceFragment {
|
||||
|
||||
private static final String REMOVE_TRUSTED_CERTIFICATES = "remove_trusted_certificates";
|
||||
|
|
|
@ -12,15 +12,15 @@ import com.google.common.base.Strings;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.receiver.UnifiedPushDistributor;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
import java.net.URI;
|
||||
import java.net.URISyntaxException;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.receiver.UnifiedPushDistributor;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class UpSettingsFragment extends XmppPreferenceFragment {
|
||||
|
||||
@Override
|
||||
|
|
|
@ -24,10 +24,6 @@ import androidx.core.content.ContextCompat;
|
|||
|
||||
import com.google.common.primitives.Ints;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
|
@ -38,6 +34,10 @@ import eu.siacs.conversations.ui.util.PendingItem;
|
|||
import eu.siacs.conversations.utils.TimeFrameUtils;
|
||||
import eu.siacs.conversations.utils.WeakReferenceSet;
|
||||
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
public class AudioPlayer
|
||||
implements View.OnClickListener,
|
||||
MediaPlayer.OnCompletionListener,
|
||||
|
|
|
@ -34,6 +34,7 @@ import android.content.ActivityNotFoundException;
|
|||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.text.Editable;
|
||||
import android.text.Spanned;
|
||||
import android.text.style.URLSpan;
|
||||
|
|
|
@ -40,15 +40,15 @@ import androidx.annotation.NonNull;
|
|||
|
||||
import com.google.common.base.MoreObjects;
|
||||
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
import eu.siacs.conversations.utils.MimeUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
import eu.siacs.conversations.utils.MimeUtils;
|
||||
|
||||
public class Attachment implements Parcelable {
|
||||
|
||||
Attachment(Parcel in) {
|
||||
|
|
|
@ -10,6 +10,8 @@ import android.view.Menu;
|
|||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
|
|
|
@ -42,6 +42,7 @@ import java.util.Arrays;
|
|||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
|
||||
import eu.siacs.conversations.ui.text.FixedURLSpan;
|
||||
import eu.siacs.conversations.utils.GeoHelper;
|
||||
|
|
|
@ -34,6 +34,8 @@ import android.content.Context;
|
|||
import android.util.Pair;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.appcompat.app.AlertDialog;
|
||||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.util.Collections;
|
||||
|
|
|
@ -3,11 +3,14 @@ package eu.siacs.conversations.ui.util;
|
|||
import android.content.ActivityNotFoundException;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.net.Uri;
|
||||
import android.util.Log;
|
||||
import android.widget.Toast;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
|
|
|
@ -14,6 +14,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
|
|
|
@ -8,15 +8,6 @@ import android.util.Log;
|
|||
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
import eu.siacs.conversations.AppSettings;
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
|
@ -26,6 +17,15 @@ import eu.siacs.conversations.entities.Message;
|
|||
import eu.siacs.conversations.services.XmppConnectionService;
|
||||
import eu.siacs.conversations.ui.XmppActivity;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.Locale;
|
||||
|
||||
public class ExceptionHelper {
|
||||
|
||||
private static final String FILENAME = "stacktrace.txt";
|
||||
|
|
|
@ -5,6 +5,7 @@ import android.content.ContentUris;
|
|||
import android.content.Context;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
import android.provider.DocumentsContract;
|
||||
import android.provider.MediaStore;
|
||||
|
|
|
@ -54,6 +54,7 @@ import java.util.Set;
|
|||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.xmpp.Jid;
|
||||
|
||||
public class IrregularUnicodeDetector {
|
||||
|
|
|
@ -7,6 +7,9 @@ import androidx.annotation.RequiresApi;
|
|||
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
||||
import org.conscrypt.Conscrypt;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
@ -24,9 +27,6 @@ import javax.net.ssl.SSLParameters;
|
|||
import javax.net.ssl.SSLSession;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
|
||||
public class SSLSockets {
|
||||
|
||||
public static void setSecurity(final SSLSocket sslSocket) {
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
package eu.siacs.conversations.utils;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Typeface;
|
||||
import android.text.Editable;
|
||||
|
@ -46,6 +47,7 @@ import android.widget.EditText;
|
|||
import android.widget.TextView;
|
||||
|
||||
import androidx.annotation.ColorInt;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.material.color.MaterialColors;
|
||||
|
||||
|
@ -53,6 +55,7 @@ import java.util.ArrayList;
|
|||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
import eu.siacs.conversations.ui.text.QuoteSpan;
|
||||
|
||||
|
|
|
@ -34,6 +34,7 @@ import android.content.SharedPreferences;
|
|||
import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.Color;
|
||||
import android.os.Build;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.util.TypedValue;
|
||||
|
|
|
@ -4,12 +4,12 @@ import com.google.common.base.Joiner;
|
|||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import eu.siacs.conversations.xml.Element;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import eu.siacs.conversations.xml.Element;
|
||||
|
||||
public class XmlHelper {
|
||||
public static String encodeEntities(String content) {
|
||||
content = content.replace("&", "&");
|
||||
|
|
|
@ -25,6 +25,18 @@ import com.google.common.base.Strings;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.axolotl.SQLiteAxolotlStore;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
import eu.siacs.conversations.persistance.DatabaseBackend;
|
||||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
import eu.siacs.conversations.receiver.WorkManagerEventReceiver;
|
||||
import eu.siacs.conversations.utils.BackupFileHeader;
|
||||
import eu.siacs.conversations.utils.Compatibility;
|
||||
|
||||
import java.io.DataOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
|
@ -53,18 +65,6 @@ import javax.crypto.spec.IvParameterSpec;
|
|||
import javax.crypto.spec.PBEKeySpec;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import eu.siacs.conversations.Config;
|
||||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.axolotl.SQLiteAxolotlStore;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
import eu.siacs.conversations.persistance.DatabaseBackend;
|
||||
import eu.siacs.conversations.persistance.FileBackend;
|
||||
import eu.siacs.conversations.receiver.WorkManagerEventReceiver;
|
||||
import eu.siacs.conversations.utils.BackupFileHeader;
|
||||
import eu.siacs.conversations.utils.Compatibility;
|
||||
|
||||
public class ExportBackupWorker extends Worker {
|
||||
|
||||
private static final SimpleDateFormat DATE_FORMAT =
|
||||
|
|
|
@ -114,8 +114,50 @@ import eu.siacs.conversations.xmpp.stanzas.streammgmt.AckPacket;
|
|||
import eu.siacs.conversations.xmpp.stanzas.streammgmt.EnablePacket;
|
||||
import eu.siacs.conversations.xmpp.stanzas.streammgmt.RequestPacket;
|
||||
import eu.siacs.conversations.xmpp.stanzas.streammgmt.ResumePacket;
|
||||
|
||||
import okhttp3.HttpUrl;
|
||||
|
||||
import org.xmlpull.v1.XmlPullParserException;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.ConnectException;
|
||||
import java.net.IDN;
|
||||
import java.net.InetAddress;
|
||||
import java.net.InetSocketAddress;
|
||||
import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.security.KeyManagementException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.security.Principal;
|
||||
import java.security.PrivateKey;
|
||||
import java.security.cert.X509Certificate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Hashtable;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.regex.Matcher;
|
||||
|
||||
import javax.net.ssl.KeyManager;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import javax.net.ssl.SSLPeerUnverifiedException;
|
||||
import javax.net.ssl.SSLSocket;
|
||||
import javax.net.ssl.SSLSocketFactory;
|
||||
import javax.net.ssl.X509KeyManager;
|
||||
import javax.net.ssl.X509TrustManager;
|
||||
|
||||
public class XmppConnection implements Runnable {
|
||||
|
||||
private static final int PACKET_IQ = 0;
|
||||
|
|
|
@ -4,16 +4,16 @@ import com.google.common.collect.Collections2;
|
|||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import eu.siacs.conversations.xmpp.jingle.stanzas.Content;
|
||||
import eu.siacs.conversations.xmpp.jingle.stanzas.GenericDescription;
|
||||
import eu.siacs.conversations.xmpp.jingle.stanzas.GenericTransportInfo;
|
||||
import eu.siacs.conversations.xmpp.jingle.stanzas.Group;
|
||||
import eu.siacs.conversations.xmpp.jingle.stanzas.JinglePacket;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class AbstractContentMap<
|
||||
D extends GenericDescription, T extends GenericTransportInfo> {
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue