From 739d20428a9b36fd2f9dbed18582d9f81c2296fb Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 21 Mar 2021 21:39:04 +0100 Subject: [PATCH] optimize imports --- .../siacs/conversations/crypto/PgpDecryptionService.java | 1 - .../java/eu/siacs/conversations/crypto/PgpEngine.java | 3 --- .../siacs/conversations/crypto/XmppDomainVerifier.java | 1 - .../java/eu/siacs/conversations/entities/Account.java | 1 - .../siacs/conversations/generator/MessageGenerator.java | 1 - .../siacs/conversations/http/HttpUploadConnection.java | 1 - src/main/java/eu/siacs/conversations/http/URL.java | 1 - .../eu/siacs/conversations/parser/MessageParser.java | 1 - .../eu/siacs/conversations/parser/PresenceParser.java | 1 - .../eu/siacs/conversations/persistance/FileBackend.java | 2 -- .../services/AbstractConnectionManager.java | 9 --------- .../services/AttachFileToConversationRunnable.java | 3 --- .../conversations/services/XmppConnectionService.java | 1 - .../java/eu/siacs/conversations/ui/LocationActivity.java | 2 -- .../siacs/conversations/ui/adapter/MessageAdapter.java | 2 -- .../java/eu/siacs/conversations/utils/CryptoHelper.java | 2 -- .../java/eu/siacs/conversations/utils/MessageUtils.java | 2 -- .../siacs/conversations/xmpp/jingle/stanzas/Proceed.java | 3 --- 18 files changed, 37 deletions(-) diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java b/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java index 2e992a687..0ad103155 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpDecryptionService.java @@ -14,7 +14,6 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.net.URL; import java.util.ArrayDeque; import java.util.HashSet; import java.util.List; diff --git a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java index 0d33bf79c..9652ad3eb 100644 --- a/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java +++ b/src/main/java/eu/siacs/conversations/crypto/PgpEngine.java @@ -6,17 +6,14 @@ import android.util.Log; import androidx.annotation.StringRes; -import com.google.common.base.CharMatcher; import com.google.common.base.Joiner; import com.google.common.base.Splitter; import com.google.common.base.Strings; -import com.google.common.io.BaseEncoding; import org.openintents.openpgp.OpenPgpError; import org.openintents.openpgp.OpenPgpSignatureResult; import org.openintents.openpgp.util.OpenPgpApi; import org.openintents.openpgp.util.OpenPgpApi.IOpenPgpCallback; -import org.openintents.openpgp.util.OpenPgpUtils; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; diff --git a/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java b/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java index b344ac55c..689b465c9 100644 --- a/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java +++ b/src/main/java/eu/siacs/conversations/crypto/XmppDomainVerifier.java @@ -1,6 +1,5 @@ package eu.siacs.conversations.crypto; -import android.os.Build; import android.util.Log; import android.util.Pair; diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java index 6a4b77179..969a9c765 100644 --- a/src/main/java/eu/siacs/conversations/entities/Account.java +++ b/src/main/java/eu/siacs/conversations/entities/Account.java @@ -4,7 +4,6 @@ import android.content.ContentValues; import android.database.Cursor; import android.os.SystemClock; import android.util.Log; -import android.util.Pair; import org.json.JSONException; import org.json.JSONObject; diff --git a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java index dd0291a56..4b055e158 100644 --- a/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java +++ b/src/main/java/eu/siacs/conversations/generator/MessageGenerator.java @@ -1,6 +1,5 @@ package eu.siacs.conversations.generator; -import java.net.URL; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; diff --git a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java index 0a90072c0..a6bacfa62 100644 --- a/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java +++ b/src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java @@ -14,7 +14,6 @@ import java.io.IOException; import java.util.Arrays; import java.util.List; import java.util.concurrent.Future; -import java.util.concurrent.TimeUnit; import eu.siacs.conversations.Config; import eu.siacs.conversations.entities.Account; diff --git a/src/main/java/eu/siacs/conversations/http/URL.java b/src/main/java/eu/siacs/conversations/http/URL.java index 921a29817..f51391561 100644 --- a/src/main/java/eu/siacs/conversations/http/URL.java +++ b/src/main/java/eu/siacs/conversations/http/URL.java @@ -5,7 +5,6 @@ import java.net.URISyntaxException; import java.util.Arrays; import java.util.List; -import eu.siacs.conversations.http.AesGcmURL; import okhttp3.HttpUrl; public class URL { diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java index 600e4ea84..f45b1e89b 100644 --- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java +++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java @@ -3,7 +3,6 @@ package eu.siacs.conversations.parser; import android.util.Log; import android.util.Pair; -import java.net.URL; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; diff --git a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java index 723a3fee8..9b3e38b3a 100644 --- a/src/main/java/eu/siacs/conversations/parser/PresenceParser.java +++ b/src/main/java/eu/siacs/conversations/parser/PresenceParser.java @@ -19,7 +19,6 @@ import eu.siacs.conversations.entities.Presence; import eu.siacs.conversations.generator.IqGenerator; import eu.siacs.conversations.generator.PresenceGenerator; import eu.siacs.conversations.services.XmppConnectionService; -import eu.siacs.conversations.utils.CryptoHelper; import eu.siacs.conversations.utils.XmppUri; import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xml.Namespace; diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java index b847ca169..bb5e006b8 100644 --- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java +++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java @@ -18,7 +18,6 @@ import android.net.Uri; import android.os.Build; import android.os.Environment; import android.os.ParcelFileDescriptor; -import android.os.SystemClock; import android.provider.MediaStore; import android.provider.OpenableColumns; import android.system.Os; @@ -44,7 +43,6 @@ import java.io.InputStream; import java.io.OutputStream; import java.net.ServerSocket; import java.net.Socket; -import java.net.URL; import java.security.DigestOutputStream; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; diff --git a/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java index 3024a1045..40e381816 100644 --- a/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java +++ b/src/main/java/eu/siacs/conversations/services/AbstractConnectionManager.java @@ -1,7 +1,6 @@ package eu.siacs.conversations.services; import android.content.Context; -import android.os.FileUtils; import android.os.PowerManager; import android.os.SystemClock; import android.util.Log; @@ -20,14 +19,9 @@ import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; -import java.security.InvalidAlgorithmParameterException; -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; -import java.security.NoSuchProviderException; import java.util.concurrent.atomic.AtomicLong; import javax.annotation.Nullable; -import javax.crypto.NoSuchPaddingException; import eu.siacs.conversations.Config; import eu.siacs.conversations.R; @@ -35,11 +29,8 @@ import eu.siacs.conversations.entities.DownloadableFile; import eu.siacs.conversations.utils.Compatibility; import okhttp3.MediaType; import okhttp3.RequestBody; -import okio.Buffer; import okio.BufferedSink; -import okio.ForwardingSink; import okio.Okio; -import okio.Sink; import okio.Source; import static eu.siacs.conversations.entities.Transferable.VALID_CRYPTO_EXTENSIONS; diff --git a/src/main/java/eu/siacs/conversations/services/AttachFileToConversationRunnable.java b/src/main/java/eu/siacs/conversations/services/AttachFileToConversationRunnable.java index 1bffb2bfe..5d39911ed 100644 --- a/src/main/java/eu/siacs/conversations/services/AttachFileToConversationRunnable.java +++ b/src/main/java/eu/siacs/conversations/services/AttachFileToConversationRunnable.java @@ -3,13 +3,10 @@ package eu.siacs.conversations.services; import android.content.Context; import android.content.SharedPreferences; import android.net.Uri; -import android.os.Build; import android.os.ParcelFileDescriptor; import android.preference.PreferenceManager; import android.util.Log; -import androidx.annotation.RequiresApi; - import net.ypresto.androidtranscoder.MediaTranscoder; import net.ypresto.androidtranscoder.format.MediaFormatStrategy; diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index fe6bf561f..f7da1ad4b 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -55,7 +55,6 @@ import org.openintents.openpgp.util.OpenPgpApi; import org.openintents.openpgp.util.OpenPgpServiceConnection; import java.io.File; -import java.net.URL; import java.security.SecureRandom; import java.security.Security; import java.security.cert.CertificateException; diff --git a/src/main/java/eu/siacs/conversations/ui/LocationActivity.java b/src/main/java/eu/siacs/conversations/ui/LocationActivity.java index 4ae3a8fde..ed08fa0d2 100644 --- a/src/main/java/eu/siacs/conversations/ui/LocationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/LocationActivity.java @@ -31,8 +31,6 @@ import org.osmdroid.views.MapView; import org.osmdroid.views.overlay.CopyrightOverlay; import org.osmdroid.views.overlay.Overlay; -import java.io.IOException; - import eu.siacs.conversations.BuildConfig; import eu.siacs.conversations.Config; import eu.siacs.conversations.R; diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java index 3fdcb9ad0..caba4ce64 100644 --- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java +++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java @@ -6,7 +6,6 @@ import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.graphics.Typeface; -import android.net.Uri; import android.preference.PreferenceManager; import android.text.Spannable; import android.text.SpannableString; @@ -33,7 +32,6 @@ import androidx.core.content.ContextCompat; import com.google.common.base.Strings; import java.net.URI; -import java.net.URL; import java.util.List; import java.util.Locale; import java.util.regex.Matcher; diff --git a/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java index 5119ec501..4ee826c3c 100644 --- a/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java +++ b/src/main/java/eu/siacs/conversations/utils/CryptoHelper.java @@ -9,8 +9,6 @@ import org.bouncycastle.asn1.x500.style.BCStyle; import org.bouncycastle.asn1.x500.style.IETFUtils; import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder; -import java.net.MalformedURLException; -import java.net.URL; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; diff --git a/src/main/java/eu/siacs/conversations/utils/MessageUtils.java b/src/main/java/eu/siacs/conversations/utils/MessageUtils.java index ce58797a8..9fc6c5ca8 100644 --- a/src/main/java/eu/siacs/conversations/utils/MessageUtils.java +++ b/src/main/java/eu/siacs/conversations/utils/MessageUtils.java @@ -29,8 +29,6 @@ package eu.siacs.conversations.utils; -import android.net.Uri; - import com.google.common.base.Strings; import java.net.URI; diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Proceed.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Proceed.java index a9c399754..b7b9da600 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Proceed.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/stanzas/Proceed.java @@ -1,11 +1,8 @@ package eu.siacs.conversations.xmpp.jingle.stanzas; import com.google.common.base.Preconditions; -import com.google.common.collect.ImmutableList; import com.google.common.primitives.Ints; -import java.util.List; - import eu.siacs.conversations.xml.Element; import eu.siacs.conversations.xml.Namespace;