From ba0fadbdb140139c7cea01280b00a50d83cbf815 Mon Sep 17 00:00:00 2001 From: ChronosX88 Date: Sat, 23 Mar 2019 16:44:06 +0400 Subject: [PATCH] Optimize imports --- .../chronosx88/influence/helpers/KeyPairManager.java | 1 - .../chronosx88/influence/helpers/Serializer.java | 1 - .../github/chronosx88/influence/logic/MainLogic.java | 11 ----------- .../chronosx88/influence/logic/StartChatLogic.java | 4 ---- .../influence/models/roomEntities/ChatEntity.java | 6 ------ .../influence/presenters/StartChatPresenter.java | 1 - .../chronosx88/influence/views/MainActivity.java | 1 - 7 files changed, 25 deletions(-) diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/KeyPairManager.java b/app/src/main/java/io/github/chronosx88/influence/helpers/KeyPairManager.java index b0147a1..52e1749 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/KeyPairManager.java +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/KeyPairManager.java @@ -4,7 +4,6 @@ import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; -import java.nio.charset.StandardCharsets; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.NoSuchAlgorithmException; diff --git a/app/src/main/java/io/github/chronosx88/influence/helpers/Serializer.java b/app/src/main/java/io/github/chronosx88/influence/helpers/Serializer.java index ccefce7..73b403e 100644 --- a/app/src/main/java/io/github/chronosx88/influence/helpers/Serializer.java +++ b/app/src/main/java/io/github/chronosx88/influence/helpers/Serializer.java @@ -5,7 +5,6 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; -import java.nio.charset.StandardCharsets; public class Serializer { public static byte[] serialize(Object object) { diff --git a/app/src/main/java/io/github/chronosx88/influence/logic/MainLogic.java b/app/src/main/java/io/github/chronosx88/influence/logic/MainLogic.java index cd103db..fc578d4 100644 --- a/app/src/main/java/io/github/chronosx88/influence/logic/MainLogic.java +++ b/app/src/main/java/io/github/chronosx88/influence/logic/MainLogic.java @@ -2,12 +2,10 @@ package io.github.chronosx88.influence.logic; import android.content.Context; import android.content.SharedPreferences; -import android.util.Base64; import android.util.Log; import com.google.gson.Gson; import com.google.gson.JsonObject; -import com.google.gson.JsonParser; import net.tomp2p.dht.FuturePut; import net.tomp2p.dht.PeerBuilderDHT; @@ -24,13 +22,10 @@ import net.tomp2p.relay.tcp.TCPRelayClientConfig; import net.tomp2p.replication.AutoReplication; import net.tomp2p.storage.Data; -import org.json.JSONObject; - import java.io.IOException; import java.net.Inet4Address; import java.net.InetAddress; import java.net.UnknownHostException; -import java.nio.charset.StandardCharsets; import java.security.KeyFactory; import java.security.KeyPair; import java.security.NoSuchAlgorithmException; @@ -42,15 +37,9 @@ import io.github.chronosx88.influence.contracts.main.MainLogicContract; import io.github.chronosx88.influence.helpers.AppHelper; import io.github.chronosx88.influence.helpers.DSAKey; import io.github.chronosx88.influence.helpers.KeyPairManager; -import io.github.chronosx88.influence.helpers.PrepareData; -import io.github.chronosx88.influence.helpers.Serializer; import io.github.chronosx88.influence.helpers.StorageMVStore; -import io.github.chronosx88.influence.helpers.actions.NetworkActions; import io.github.chronosx88.influence.helpers.actions.UIActions; -import io.github.chronosx88.influence.models.BasicNetworkMessage; -import io.github.chronosx88.influence.models.NewChatRequestMessage; import io.github.chronosx88.influence.models.PublicUserProfile; -import io.github.chronosx88.influence.observable.MainObservable; public class MainLogic implements MainLogicContract { private static final String LOG_TAG = "MainLogic"; diff --git a/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java b/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java index 48fb445..6fc654e 100644 --- a/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java +++ b/app/src/main/java/io/github/chronosx88/influence/logic/StartChatLogic.java @@ -4,7 +4,6 @@ import android.util.Log; import com.google.gson.Gson; import com.google.gson.JsonObject; -import com.google.gson.JsonParser; import net.tomp2p.dht.FutureGet; import net.tomp2p.dht.FuturePut; @@ -20,12 +19,9 @@ import java.util.UUID; import io.github.chronosx88.influence.contracts.startchat.StartChatLogicContract; import io.github.chronosx88.influence.helpers.AppHelper; import io.github.chronosx88.influence.helpers.KeyPairManager; -import io.github.chronosx88.influence.helpers.PrepareData; -import io.github.chronosx88.influence.helpers.actions.NetworkActions; import io.github.chronosx88.influence.helpers.actions.UIActions; import io.github.chronosx88.influence.models.NewChatRequestMessage; import io.github.chronosx88.influence.models.PublicUserProfile; -import io.github.chronosx88.influence.observable.MainObservable; public class StartChatLogic implements StartChatLogicContract { private PeerDHT peerDHT; diff --git a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java index a698ce9..f6ffd09 100644 --- a/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java +++ b/app/src/main/java/io/github/chronosx88/influence/models/roomEntities/ChatEntity.java @@ -1,11 +1,5 @@ package io.github.chronosx88.influence.models.roomEntities; -import net.tomp2p.peers.PeerAddress; - -import java.util.ArrayList; -import java.util.Collections; - -import androidx.annotation.NonNull; import androidx.room.ColumnInfo; import androidx.room.Entity; import androidx.room.PrimaryKey; diff --git a/app/src/main/java/io/github/chronosx88/influence/presenters/StartChatPresenter.java b/app/src/main/java/io/github/chronosx88/influence/presenters/StartChatPresenter.java index 707c76d..2d75f13 100644 --- a/app/src/main/java/io/github/chronosx88/influence/presenters/StartChatPresenter.java +++ b/app/src/main/java/io/github/chronosx88/influence/presenters/StartChatPresenter.java @@ -9,7 +9,6 @@ import io.github.chronosx88.influence.contracts.startchat.StartChatViewContract; import io.github.chronosx88.influence.helpers.AppHelper; import io.github.chronosx88.influence.helpers.actions.UIActions; import io.github.chronosx88.influence.logic.StartChatLogic; -import io.github.chronosx88.influence.observable.MainObservable; public class StartChatPresenter implements StartChatPresenterContract, Observer { private StartChatViewContract view; diff --git a/app/src/main/java/io/github/chronosx88/influence/views/MainActivity.java b/app/src/main/java/io/github/chronosx88/influence/views/MainActivity.java index 7d9b2ed..b9edbd6 100644 --- a/app/src/main/java/io/github/chronosx88/influence/views/MainActivity.java +++ b/app/src/main/java/io/github/chronosx88/influence/views/MainActivity.java @@ -18,7 +18,6 @@ import io.github.chronosx88.influence.contracts.main.MainViewContract; import io.github.chronosx88.influence.contracts.observer.Observer; import io.github.chronosx88.influence.helpers.AppHelper; import io.github.chronosx88.influence.helpers.actions.UIActions; -import io.github.chronosx88.influence.observable.MainObservable; import io.github.chronosx88.influence.presenters.MainPresenter; import io.github.chronosx88.influence.views.fragments.ChatListFragment; import io.github.chronosx88.influence.views.fragments.SettingsFragment;