aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/entities
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-04-05 20:09:38 +0200
committerChristian Schneppe <christian@pix-art.de>2017-04-05 22:21:41 +0200
commit81004cce0a87b16de103a3b956a8729ef9c08492 (patch)
tree0969902380a362c690a81272c5ff16248f4b7a98 /src/main/java/de/pixart/messenger/entities
parentc95f89f1e7795d9c3048931b3f51ebea690d2c7e (diff)
Save some memory and delete unused imports and variables
Diffstat (limited to 'src/main/java/de/pixart/messenger/entities')
-rw-r--r--src/main/java/de/pixart/messenger/entities/Conversation.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/entities/Conversation.java b/src/main/java/de/pixart/messenger/entities/Conversation.java
index ec59e2c07..815f173f2 100644
--- a/src/main/java/de/pixart/messenger/entities/Conversation.java
+++ b/src/main/java/de/pixart/messenger/entities/Conversation.java
@@ -2,6 +2,7 @@ package de.pixart.messenger.entities;
import android.content.ContentValues;
import android.database.Cursor;
+import android.support.annotation.NonNull;
import net.java.otr4j.OtrException;
import net.java.otr4j.crypto.OtrCryptoException;
@@ -15,7 +16,6 @@ import org.json.JSONObject;
import java.security.interfaces.DSAPublicKey;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
@@ -38,7 +38,6 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public static final int STATUS_AVAILABLE = 0;
public static final int STATUS_ARCHIVED = 1;
- public static final int STATUS_DELETED = 2;
public static final int MODE_MULTI = 1;
public static final int MODE_SINGLE = 0;
@@ -363,7 +362,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
public List<Jid> getAcceptedCryptoTargets() {
if (mode == MODE_SINGLE) {
- return Arrays.asList(getJid().toBareJid());
+ return Collections.singletonList(getJid().toBareJid());
} else {
return getJidListAttribute(ATTRIBUTE_CRYPTO_TARGETS);
}
@@ -387,7 +386,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
}
@Override
- public int compareTo(Conversation another) {
+ public int compareTo(@NonNull Conversation another) {
final Message left = getLatestMessage();
final Message right = another.getLatestMessage();
if (left.getTimeSent() > right.getTimeSent()) {