From 6368dedc63d1e84ec90ddd6fa66cb60f6dc38f86 Mon Sep 17 00:00:00 2001 From: Christian Schneppe Date: Sun, 8 Dec 2019 15:53:03 +0100 Subject: use Base64.NO_WRAP instead of trim() --- src/main/java/de/pixart/messenger/generator/AbstractGenerator.java | 2 +- src/main/java/de/pixart/messenger/generator/IqGenerator.java | 4 ---- src/main/java/de/pixart/messenger/utils/CursorUtils.java | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java b/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java index 90bab190d..97d92f44e 100644 --- a/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java +++ b/src/main/java/de/pixart/messenger/generator/AbstractGenerator.java @@ -102,7 +102,7 @@ public abstract class AbstractGenerator { for (String feature : getFeatures(account)) { s.append(feature).append('<'); } - byte[] sha1 = md.digest(s.toString().getBytes()); + final byte[] sha1 = md.digest(s.toString().getBytes()); return Base64.encodeToString(sha1, Base64.NO_WRAP); } diff --git a/src/main/java/de/pixart/messenger/generator/IqGenerator.java b/src/main/java/de/pixart/messenger/generator/IqGenerator.java index b106aff92..30363080c 100644 --- a/src/main/java/de/pixart/messenger/generator/IqGenerator.java +++ b/src/main/java/de/pixart/messenger/generator/IqGenerator.java @@ -160,10 +160,6 @@ public class IqGenerator extends AbstractGenerator { return publish("urn:xmpp:avatar:data", item, options); } - public IqPacket publishElement(final String namespace, final Element element, final Bundle options) { - return publishElement(namespace, element, "curent", options); - } - public IqPacket publishElement(final String namespace, final Element element, String id, final Bundle options) { final Element item = new Element("item"); item.setAttribute("id", id); diff --git a/src/main/java/de/pixart/messenger/utils/CursorUtils.java b/src/main/java/de/pixart/messenger/utils/CursorUtils.java index 39b4df908..dc6c3f231 100644 --- a/src/main/java/de/pixart/messenger/utils/CursorUtils.java +++ b/src/main/java/de/pixart/messenger/utils/CursorUtils.java @@ -11,7 +11,7 @@ public class CursorUtils { if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P) { if (cursor instanceof AbstractWindowedCursor) { final AbstractWindowedCursor windowedCursor = (AbstractWindowedCursor) cursor; - windowedCursor.setWindow(new CursorWindow("8k", 8 * 1024 * 1024)); + windowedCursor.setWindow(new CursorWindow("8M", 8 * 1024 * 1024)); } if (cursor instanceof SQLiteCursor) { ((SQLiteCursor) cursor).setFillWindowForwardOnly(true); -- cgit v1.2.3