aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/eu/siacs/conversations/Config.java2
-rw-r--r--src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java220
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Conversation.java21
-rw-r--r--src/main/java/eu/siacs/conversations/parser/IqParser.java2
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java5
-rw-r--r--src/main/java/eu/siacs/conversations/persistance/FileBackend.java5
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java10
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java11
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java86
-rw-r--r--src/main/java/eu/siacs/conversations/utils/FileUtils.java8
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java21
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java26
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_received.9.pngbin765 -> 765 bytes
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_received_warning.9.pngbin757 -> 757 bytes
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_received_white.9.pngbin0 -> 779 bytes
-rw-r--r--src/main/res/drawable-hdpi/message_bubble_sent.9.pngbin687 -> 687 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_received.9.pngbin594 -> 594 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_received_warning.9.pngbin598 -> 598 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_received_white.9.pngbin0 -> 610 bytes
-rw-r--r--src/main/res/drawable-mdpi/message_bubble_sent.9.pngbin558 -> 558 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_received.9.pngbin929 -> 929 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_received_warning.9.pngbin921 -> 921 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_received_white.9.pngbin0 -> 935 bytes
-rw-r--r--src/main/res/drawable-xhdpi/message_bubble_sent.9.pngbin857 -> 857 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_received.9.pngbin1334 -> 1334 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.pngbin1308 -> 1308 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_received_white.9.pngbin0 -> 1344 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/message_bubble_sent.9.pngbin1190 -> 1190 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_received.9.pngbin1714 -> 1714 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.pngbin1674 -> 1674 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_received_white.9.pngbin0 -> 1705 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/message_bubble_sent.9.pngbin1499 -> 1499 bytes
-rw-r--r--src/main/res/menu/encryption_choices.xml2
-rw-r--r--src/main/res/values-ar-rEG/strings.xml2
-rw-r--r--src/main/res/values-bg/strings.xml2
-rw-r--r--src/main/res/values-ca/strings.xml2
-rw-r--r--src/main/res/values-cs/strings.xml2
-rw-r--r--src/main/res/values-de/strings.xml6
-rw-r--r--src/main/res/values-el/strings.xml2
-rw-r--r--src/main/res/values-es/strings.xml2
-rw-r--r--src/main/res/values-eu/strings.xml2
-rw-r--r--src/main/res/values-fr/strings.xml2
-rw-r--r--src/main/res/values-gl/strings.xml2
-rw-r--r--src/main/res/values-id/strings.xml16
-rw-r--r--src/main/res/values-it/strings.xml2
-rw-r--r--src/main/res/values-iw/strings.xml2
-rw-r--r--src/main/res/values-ja/strings.xml2
-rw-r--r--src/main/res/values-ko/strings.xml2
-rw-r--r--src/main/res/values-nl/strings.xml2
-rw-r--r--src/main/res/values-pl/strings.xml2
-rw-r--r--src/main/res/values-pt/strings.xml2
-rw-r--r--src/main/res/values-ro-rRO/strings.xml1
-rw-r--r--src/main/res/values-ru/strings.xml2
-rw-r--r--src/main/res/values-sk/strings.xml2
-rw-r--r--src/main/res/values-sr/strings.xml2
-rw-r--r--src/main/res/values-sv/strings.xml2
-rw-r--r--src/main/res/values-zh-rCN/strings.xml2
-rw-r--r--src/main/res/values-zh-rTW/strings.xml2
-rw-r--r--src/main/res/values/strings.xml6
-rw-r--r--src/main/res/xml/preferences.xml5
61 files changed, 265 insertions, 235 deletions
diff --git a/src/main/java/eu/siacs/conversations/Config.java b/src/main/java/eu/siacs/conversations/Config.java
index a92b1024a..249dcfc90 100644
--- a/src/main/java/eu/siacs/conversations/Config.java
+++ b/src/main/java/eu/siacs/conversations/Config.java
@@ -19,7 +19,7 @@ public final class Config {
public static final int PING_TIMEOUT = 10;
public static final int SOCKET_TIMEOUT = 15;
public static final int CONNECT_TIMEOUT = 90;
- public static final int CARBON_GRACE_PERIOD = 60;
+ public static final int CARBON_GRACE_PERIOD = 90;
public static final int MINI_GRACE_PERIOD = 750;
public static final int AVATAR_SIZE = 384;
diff --git a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
index d700b644b..17d911b44 100644
--- a/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
+++ b/src/main/java/eu/siacs/conversations/crypto/axolotl/AxolotlService.java
@@ -50,6 +50,7 @@ public class AxolotlService {
public static final String LOGPREFIX = "AxolotlService";
public static final int NUM_KEYS_TO_PUBLISH = 100;
+ public static final int publishTriesThreshold = 3;
private final Account account;
private final XmppConnectionService mXmppConnectionService;
@@ -59,6 +60,8 @@ public class AxolotlService {
private final Map<String, XmppAxolotlMessage> messageCache;
private final FetchStatusMap fetchStatusMap;
private final SerialSingleThreadExecutor executor;
+ private int numPublishTriesOnEmptyPep = 0;
+ private boolean pepBroken = false;
private static class AxolotlAddressMap<T> {
protected Map<String, Map<Integer, T>> map;
@@ -228,8 +231,7 @@ public class AxolotlService {
axolotlStore.regenerate();
sessions.clear();
fetchStatusMap.clear();
- publishBundlesIfNeeded();
- publishOwnDeviceIdIfNeeded();
+ publishBundlesIfNeeded(true);
}
public int getOwnDeviceId() {
@@ -255,8 +257,15 @@ public class AxolotlService {
public void registerDevices(final Jid jid, @NonNull final Set<Integer> deviceIds) {
if (jid.toBareJid().equals(account.getJid().toBareJid())) {
+ if (!deviceIds.isEmpty()) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Received non-empty own device list. Resetting publish attemps and pepBroken status.");
+ pepBroken = false;
+ numPublishTriesOnEmptyPep = 0;
+ }
if (deviceIds.contains(getOwnDeviceId())) {
deviceIds.remove(getOwnDeviceId());
+ } else {
+ publishOwnDeviceId(deviceIds);
}
for (Integer deviceId : deviceIds) {
AxolotlAddress ownDeviceAddress = new AxolotlAddress(jid.toBareJid().toString(), deviceId);
@@ -282,10 +291,13 @@ public class AxolotlService {
XmppAxolotlSession.Trust.UNTRUSTED);
this.deviceIds.put(jid, deviceIds);
mXmppConnectionService.keyStatusUpdated();
- publishOwnDeviceIdIfNeeded();
}
public void wipeOtherPepDevices() {
+ if (pepBroken) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "wipeOtherPepDevices called, but PEP is broken. Ignoring... ");
+ return;
+ }
Set<Integer> deviceIds = new HashSet<>();
deviceIds.add(getOwnDeviceId());
IqPacket publish = mXmppConnectionService.getIqGenerator().publishDeviceIds(deviceIds);
@@ -303,6 +315,10 @@ public class AxolotlService {
}
public void publishOwnDeviceIdIfNeeded() {
+ if (pepBroken) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "publishOwnDeviceIdIfNeeded called, but PEP is broken. Ignoring... ");
+ return;
+ }
IqPacket packet = mXmppConnectionService.getIqGenerator().retrieveDeviceIds(account.getJid().toBareJid());
mXmppConnectionService.sendIqPacket(account, packet, new OnIqPacketReceived() {
@Override
@@ -310,118 +326,148 @@ public class AxolotlService {
if (packet.getType() == IqPacket.TYPE.RESULT) {
Element item = mXmppConnectionService.getIqParser().getItem(packet);
Set<Integer> deviceIds = mXmppConnectionService.getIqParser().deviceIds(item);
- if (deviceIds == null) {
- deviceIds = new HashSet<Integer>();
- }
if (!deviceIds.contains(getOwnDeviceId())) {
- deviceIds.add(getOwnDeviceId());
- IqPacket publish = mXmppConnectionService.getIqGenerator().publishDeviceIds(deviceIds);
- Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Own device " + getOwnDeviceId() + " not in PEP devicelist. Publishing: " + publish);
- mXmppConnectionService.sendIqPacket(account, publish, new OnIqPacketReceived() {
- @Override
- public void onIqPacketReceived(Account account, IqPacket packet) {
- // TODO: implement this!
- }
- });
+ publishOwnDeviceId(deviceIds);
}
} else {
- Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing device ID:" + packet.findChild("error"));
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while retrieving Device Ids" + packet.findChild("error"));
}
}
});
}
- public void publishBundlesIfNeeded() {
+ public void publishOwnDeviceId(Set<Integer> deviceIds) {
+ if (!deviceIds.contains(getOwnDeviceId())) {
+ Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Own device " + getOwnDeviceId() + " not in PEP devicelist.");
+ if (deviceIds.isEmpty()) {
+ if (numPublishTriesOnEmptyPep >= publishTriesThreshold) {
+ Log.w(Config.LOGTAG, getLogprefix(account) + "Own device publish attempt threshold exceeded, aborting...");
+ pepBroken = true;
+ return;
+ } else {
+ numPublishTriesOnEmptyPep++;
+ Log.w(Config.LOGTAG, getLogprefix(account) + "Own device list empty, attempting to publish (try " + numPublishTriesOnEmptyPep + ")");
+ }
+ } else {
+ numPublishTriesOnEmptyPep = 0;
+ }
+ deviceIds.add(getOwnDeviceId());
+ IqPacket publish = mXmppConnectionService.getIqGenerator().publishDeviceIds(deviceIds);
+ mXmppConnectionService.sendIqPacket(account, publish, new OnIqPacketReceived() {
+ @Override
+ public void onIqPacketReceived(Account account, IqPacket packet) {
+ if (packet.getType() != IqPacket.TYPE.RESULT) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing own device id" + packet.findChild("error"));
+ }
+ }
+ });
+ }
+ }
+
+ public void publishBundlesIfNeeded(final boolean announceAfter) {
+ if (pepBroken) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "publishBundlesIfNeeded called, but PEP is broken. Ignoring... ");
+ return;
+ }
IqPacket packet = mXmppConnectionService.getIqGenerator().retrieveBundlesForDevice(account.getJid().toBareJid(), getOwnDeviceId());
mXmppConnectionService.sendIqPacket(account, packet, new OnIqPacketReceived() {
@Override
public void onIqPacketReceived(Account account, IqPacket packet) {
- if (packet.getType() == IqPacket.TYPE.RESULT) {
- PreKeyBundle bundle = mXmppConnectionService.getIqParser().bundle(packet);
- Map<Integer, ECPublicKey> keys = mXmppConnectionService.getIqParser().preKeyPublics(packet);
- boolean flush = false;
- if (bundle == null) {
- Log.w(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received invalid bundle:" + packet);
- bundle = new PreKeyBundle(-1, -1, -1, null, -1, null, null, null);
- flush = true;
- }
- if (keys == null) {
- Log.w(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received invalid prekeys:" + packet);
+ PreKeyBundle bundle = mXmppConnectionService.getIqParser().bundle(packet);
+ Map<Integer, ECPublicKey> keys = mXmppConnectionService.getIqParser().preKeyPublics(packet);
+ boolean flush = false;
+ if (bundle == null) {
+ Log.w(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received invalid bundle:" + packet);
+ bundle = new PreKeyBundle(-1, -1, -1, null, -1, null, null, null);
+ flush = true;
+ }
+ if (keys == null) {
+ Log.w(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Received invalid prekeys:" + packet);
+ }
+ try {
+ boolean changed = false;
+ // Validate IdentityKey
+ IdentityKeyPair identityKeyPair = axolotlStore.getIdentityKeyPair();
+ if (flush || !identityKeyPair.getPublicKey().equals(bundle.getIdentityKey())) {
+ Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding own IdentityKey " + identityKeyPair.getPublicKey() + " to PEP.");
+ changed = true;
}
- try {
- boolean changed = false;
- // Validate IdentityKey
- IdentityKeyPair identityKeyPair = axolotlStore.getIdentityKeyPair();
- if (flush || !identityKeyPair.getPublicKey().equals(bundle.getIdentityKey())) {
- Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding own IdentityKey " + identityKeyPair.getPublicKey() + " to PEP.");
- changed = true;
- }
- // Validate signedPreKeyRecord + ID
- SignedPreKeyRecord signedPreKeyRecord;
- int numSignedPreKeys = axolotlStore.loadSignedPreKeys().size();
- try {
- signedPreKeyRecord = axolotlStore.loadSignedPreKey(bundle.getSignedPreKeyId());
- if (flush
- || !bundle.getSignedPreKey().equals(signedPreKeyRecord.getKeyPair().getPublicKey())
- || !Arrays.equals(bundle.getSignedPreKeySignature(), signedPreKeyRecord.getSignature())) {
- Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding new signedPreKey with ID " + (numSignedPreKeys + 1) + " to PEP.");
- signedPreKeyRecord = KeyHelper.generateSignedPreKey(identityKeyPair, numSignedPreKeys + 1);
- axolotlStore.storeSignedPreKey(signedPreKeyRecord.getId(), signedPreKeyRecord);
- changed = true;
- }
- } catch (InvalidKeyIdException e) {
+ // Validate signedPreKeyRecord + ID
+ SignedPreKeyRecord signedPreKeyRecord;
+ int numSignedPreKeys = axolotlStore.loadSignedPreKeys().size();
+ try {
+ signedPreKeyRecord = axolotlStore.loadSignedPreKey(bundle.getSignedPreKeyId());
+ if (flush
+ || !bundle.getSignedPreKey().equals(signedPreKeyRecord.getKeyPair().getPublicKey())
+ || !Arrays.equals(bundle.getSignedPreKeySignature(), signedPreKeyRecord.getSignature())) {
Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding new signedPreKey with ID " + (numSignedPreKeys + 1) + " to PEP.");
signedPreKeyRecord = KeyHelper.generateSignedPreKey(identityKeyPair, numSignedPreKeys + 1);
axolotlStore.storeSignedPreKey(signedPreKeyRecord.getId(), signedPreKeyRecord);
changed = true;
}
+ } catch (InvalidKeyIdException e) {
+ Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding new signedPreKey with ID " + (numSignedPreKeys + 1) + " to PEP.");
+ signedPreKeyRecord = KeyHelper.generateSignedPreKey(identityKeyPair, numSignedPreKeys + 1);
+ axolotlStore.storeSignedPreKey(signedPreKeyRecord.getId(), signedPreKeyRecord);
+ changed = true;
+ }
- // Validate PreKeys
- Set<PreKeyRecord> preKeyRecords = new HashSet<>();
- if (keys != null) {
- for (Integer id : keys.keySet()) {
- try {
- PreKeyRecord preKeyRecord = axolotlStore.loadPreKey(id);
- if (preKeyRecord.getKeyPair().getPublicKey().equals(keys.get(id))) {
- preKeyRecords.add(preKeyRecord);
- }
- } catch (InvalidKeyIdException ignored) {
+ // Validate PreKeys
+ Set<PreKeyRecord> preKeyRecords = new HashSet<>();
+ if (keys != null) {
+ for (Integer id : keys.keySet()) {
+ try {
+ PreKeyRecord preKeyRecord = axolotlStore.loadPreKey(id);
+ if (preKeyRecord.getKeyPair().getPublicKey().equals(keys.get(id))) {
+ preKeyRecords.add(preKeyRecord);
}
+ } catch (InvalidKeyIdException ignored) {
}
}
- int newKeys = NUM_KEYS_TO_PUBLISH - preKeyRecords.size();
- if (newKeys > 0) {
- List<PreKeyRecord> newRecords = KeyHelper.generatePreKeys(
- axolotlStore.getCurrentPreKeyId() + 1, newKeys);
- preKeyRecords.addAll(newRecords);
- for (PreKeyRecord record : newRecords) {
- axolotlStore.storePreKey(record.getId(), record);
- }
- changed = true;
- Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding " + newKeys + " new preKeys to PEP.");
+ }
+ int newKeys = NUM_KEYS_TO_PUBLISH - preKeyRecords.size();
+ if (newKeys > 0) {
+ List<PreKeyRecord> newRecords = KeyHelper.generatePreKeys(
+ axolotlStore.getCurrentPreKeyId() + 1, newKeys);
+ preKeyRecords.addAll(newRecords);
+ for (PreKeyRecord record : newRecords) {
+ axolotlStore.storePreKey(record.getId(), record);
}
+ changed = true;
+ Log.i(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Adding " + newKeys + " new preKeys to PEP.");
+ }
- if (changed) {
- IqPacket publish = mXmppConnectionService.getIqGenerator().publishBundles(
- signedPreKeyRecord, axolotlStore.getIdentityKeyPair().getPublicKey(),
- preKeyRecords, getOwnDeviceId());
- Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + ": Bundle " + getOwnDeviceId() + " in PEP not current. Publishing: " + publish);
- mXmppConnectionService.sendIqPacket(account, publish, new OnIqPacketReceived() {
- @Override
- public void onIqPacketReceived(Account account, IqPacket packet) {
- // TODO: implement this!
- Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Published bundle, got: " + packet);
+ if (changed) {
+ IqPacket publish = mXmppConnectionService.getIqGenerator().publishBundles(
+ signedPreKeyRecord, axolotlStore.getIdentityKeyPair().getPublicKey(),
+ preKeyRecords, getOwnDeviceId());
+ Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + ": Bundle " + getOwnDeviceId() + " in PEP not current. Publishing: " + publish);
+ mXmppConnectionService.sendIqPacket(account, publish, new OnIqPacketReceived() {
+ @Override
+ public void onIqPacketReceived(Account account, IqPacket packet) {
+ if (packet.getType() == IqPacket.TYPE.RESULT) {
+ Log.d(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Successfully published bundle. ");
+ if (announceAfter) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Announcing device " + getOwnDeviceId());
+ publishOwnDeviceIdIfNeeded();
+ }
+ } else {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing bundle: " + packet.findChild("error"));
}
- });
+ }
+ });
+ } else {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Bundle " + getOwnDeviceId() + " in PEP was current");
+ if (announceAfter) {
+ Log.d(Config.LOGTAG, getLogprefix(account) + "Announcing device " + getOwnDeviceId());
+ publishOwnDeviceIdIfNeeded();
}
- } catch (InvalidKeyException e) {
- Log.e(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Failed to publish bundle " + getOwnDeviceId() + ", reason: " + e.getMessage());
- return;
}
- } else {
- Log.d(Config.LOGTAG, getLogprefix(account) + "Error received while publishing Bundle:" + packet.findChild("error"));
+ } catch (InvalidKeyException e) {
+ Log.e(Config.LOGTAG, AxolotlService.getLogprefix(account) + "Failed to publish bundle " + getOwnDeviceId() + ", reason: " + e.getMessage());
+ return;
}
}
});
@@ -699,7 +745,7 @@ public class AxolotlService {
plaintextMessage = message.decrypt(session, getOwnDeviceId());
Integer preKeyId = session.getPreKeyId();
if (preKeyId != null) {
- publishBundlesIfNeeded();
+ publishBundlesIfNeeded(false);
session.resetPreKeyId();
}
} catch (CryptoFailedException e) {
diff --git a/src/main/java/eu/siacs/conversations/entities/Conversation.java b/src/main/java/eu/siacs/conversations/entities/Conversation.java
index cea0d700f..ef52e3bb0 100644
--- a/src/main/java/eu/siacs/conversations/entities/Conversation.java
+++ b/src/main/java/eu/siacs/conversations/entities/Conversation.java
@@ -202,14 +202,25 @@ public class Conversation extends AbstractEntity implements Blockable {
}
}
- public Message findSentMessageWithUuid(String uuid) {
+ public Message findSentMessageWithUuidOrRemoteId(String id) {
synchronized (this.messages) {
for (Message message : this.messages) {
- if (uuid.equals(message.getUuid())
- || (message.getStatus() >= Message.STATUS_SEND && uuid
- .equals(message.getRemoteMsgId()))) {
+ if (id.equals(message.getUuid())
+ || (message.getStatus() >= Message.STATUS_SEND
+ && id.equals(message.getRemoteMsgId()))) {
return message;
- }
+ }
+ }
+ }
+ return null;
+ }
+
+ public Message findSentMessageWithUuid(String id) {
+ synchronized (this.messages) {
+ for (Message message : this.messages) {
+ if (id.equals(message.getUuid())) {
+ return message;
+ }
}
}
return null;
diff --git a/src/main/java/eu/siacs/conversations/parser/IqParser.java b/src/main/java/eu/siacs/conversations/parser/IqParser.java
index cef5b03d9..44e4bc089 100644
--- a/src/main/java/eu/siacs/conversations/parser/IqParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/IqParser.java
@@ -138,7 +138,7 @@ public class IqParser extends AbstractParser implements OnIqPacketReceived {
}
try {
publicKey = Curve.decodePoint(Base64.decode(signedPreKeyPublic.getContent(),Base64.DEFAULT), 0);
- } catch (InvalidKeyException e) {
+ } catch (InvalidKeyException | IllegalArgumentException e) {
Log.e(Config.LOGTAG, AxolotlService.LOGPREFIX+" : "+"Invalid signedPreKeyPublic in PEP: " + e.getMessage());
}
return publicKey;
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index 025ed1e7e..ec900de4d 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -311,10 +311,9 @@ public class MessageParser extends AbstractParser implements
status = Message.STATUS_SEND_RECEIVED;
if (mXmppConnectionService.markMessage(conversation, remoteMsgId, status)) {
return;
- } else {
- Message message = conversation.findSentMessageWithBody(body);
+ } else if (remoteMsgId == null) {
+ Message message = conversation.findSentMessageWithBody(packet.getBody());
if (message != null) {
- message.setRemoteMsgId(remoteMsgId);
mXmppConnectionService.markMessage(message, status);
return;
}
diff --git a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
index a0c676bf9..135d5648d 100644
--- a/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
+++ b/src/main/java/eu/siacs/conversations/persistance/FileBackend.java
@@ -1,6 +1,5 @@
package eu.siacs.conversations.persistance;
-import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
@@ -8,7 +7,6 @@ import android.graphics.Matrix;
import android.graphics.RectF;
import android.net.Uri;
import android.os.Environment;
-import android.provider.MediaStore;
import android.util.Base64;
import android.util.Base64OutputStream;
import android.util.Log;
@@ -137,6 +135,9 @@ public class FileBackend {
options.inJustDecodeBounds = true;
try {
BitmapFactory.decodeStream(mXmppConnectionService.getContentResolver().openInputStream(uri), null, options);
+ if (options == null || options.outMimeType == null) {
+ return false;
+ }
return (options.outWidth <= Config.IMAGE_SIZE && options.outHeight <= Config.IMAGE_SIZE && options.outMimeType.contains(Config.IMAGE_FORMAT.name().toLowerCase()));
} catch (FileNotFoundException e) {
return false;
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index b08a71bfa..4edaa324c 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -84,9 +84,9 @@ import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xmpp.OnBindListener;
import eu.siacs.conversations.xmpp.OnContactStatusChanged;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
+import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
import eu.siacs.conversations.xmpp.OnMessageAcknowledged;
import eu.siacs.conversations.xmpp.OnMessagePacketReceived;
-import eu.siacs.conversations.xmpp.OnKeyStatusUpdated;
import eu.siacs.conversations.xmpp.OnPresencePacketReceived;
import eu.siacs.conversations.xmpp.OnStatusChanged;
import eu.siacs.conversations.xmpp.OnUpdateBlocklist;
@@ -165,8 +165,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
mMessageArchiveService.executePendingQueries(account);
mJingleConnectionManager.cancelInTransmission();
syncDirtyContacts(account);
- account.getAxolotlService().publishOwnDeviceIdIfNeeded();
- account.getAxolotlService().publishBundlesIfNeeded();
+ account.getAxolotlService().publishBundlesIfNeeded(true);
}
};
private final OnMessageAcknowledged mOnMessageAcknowledgedListener = new OnMessageAcknowledged() {
@@ -2216,7 +2215,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
}
for (Conversation conversation : getConversations()) {
if (conversation.getJid().toBareJid().equals(recipient) && conversation.getAccount() == account) {
- final Message message = conversation.findSentMessageWithUuid(uuid);
+ final Message message = conversation.findSentMessageWithUuidOrRemoteId(uuid);
if (message != null) {
markMessage(message, status);
}
@@ -2226,8 +2225,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
return null;
}
- public boolean markMessage(Conversation conversation, String uuid,
- int status) {
+ public boolean markMessage(Conversation conversation, String uuid, int status) {
if (uuid == null) {
return false;
} else {
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 14fc83502..aaa46825d 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -985,6 +985,9 @@ public class ConversationActivity extends XmppActivity
mPendingGeoUri = null;
setSelectedConversation(conversationList.get(0));
this.mConversationFragment.reInit(getSelectedConversation());
+ } else {
+ this.mConversationFragment.messageListAdapter.updatePreferences();
+ this.mConversationFragment.messagesView.invalidateViews();
}
if(!forbidProcessingPendings) {
@@ -1163,7 +1166,7 @@ public class ConversationActivity extends XmppActivity
}
prepareFileToast = Toast.makeText(getApplicationContext(),getText(R.string.preparing_file), Toast.LENGTH_LONG);
prepareFileToast.show();
- xmppConnectionService.attachFileToConversation(conversation,uri, new UiCallback<Message>() {
+ xmppConnectionService.attachFileToConversation(conversation, uri, new UiCallback<Message>() {
@Override
public void success(Message message) {
hidePrepareFileToast();
@@ -1193,7 +1196,7 @@ public class ConversationActivity extends XmppActivity
@Override
public void userInputRequried(PendingIntent pi,
- Message object) {
+ Message object) {
hidePrepareFileToast();
}
@@ -1275,6 +1278,10 @@ public class ConversationActivity extends XmppActivity
return getPreferences().getBoolean("indicate_received", false);
}
+ public boolean useWhiteBackground() {
+ return getPreferences().getBoolean("use_white_background",false);
+ }
+
protected boolean trustKeysIfNeeded(int requestCode) {
return trustKeysIfNeeded(requestCode, ATTACHMENT_CHOICE_INVALID);
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 49878463b..3adbc8431 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -327,7 +327,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
switch (conversation.getNextEncryption()) {
case Message.ENCRYPTION_NONE:
mEditMessage
- .setHint(getString(R.string.send_plain_text_message));
+ .setHint(getString(R.string.send_unencrypted_message));
break;
case Message.ENCRYPTION_OTR:
mEditMessage.setHint(getString(R.string.send_otr_message));
@@ -662,6 +662,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
this.mEditMessage.setText("");
this.mEditMessage.append(this.conversation.getNextMessage());
this.mEditMessage.setKeyboardListener(this);
+ messageListAdapter.updatePreferences();
this.messagesView.setAdapter(messageListAdapter);
updateMessages();
this.messagesLoaded = true;
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 323c67d6b..1dbf1b101 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -3,7 +3,6 @@ package eu.siacs.conversations.ui.adapter;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
-import android.graphics.Color;
import android.graphics.Typeface;
import android.net.Uri;
import android.text.Spannable;
@@ -60,11 +59,14 @@ public class MessageAdapter extends ArrayAdapter<Message> {
return true;
}
};
+ private boolean mIndicateReceived = false;
+ private boolean mUseWhiteBackground = false;
public MessageAdapter(ConversationActivity activity, List<Message> messages) {
super(activity, 0, messages);
this.activity = activity;
metrics = getContext().getResources().getDisplayMetrics();
+ updatePreferences();
}
public void setOnContactPictureClicked(OnContactPictureClicked listener) {
@@ -96,15 +98,15 @@ public class MessageAdapter extends ArrayAdapter<Message> {
return this.getItemViewType(getItem(position));
}
- private int getMessageTextColor(int type, boolean primary) {
- if (type == SENT) {
- return activity.getResources().getColor(primary ? R.color.black87 : R.color.black54);
- } else {
+ private int getMessageTextColor(boolean onDark, boolean primary) {
+ if (onDark) {
return activity.getResources().getColor(primary ? R.color.white : R.color.white70);
+ } else {
+ return activity.getResources().getColor(primary ? R.color.black87 : R.color.black54);
}
}
- private void displayStatus(ViewHolder viewHolder, Message message, int type) {
+ private void displayStatus(ViewHolder viewHolder, Message message, int type, boolean darkBackground) {
String filesize = null;
String info = null;
boolean error = false;
@@ -140,12 +142,12 @@ public class MessageAdapter extends ArrayAdapter<Message> {
info = getContext().getString(R.string.offering);
break;
case Message.STATUS_SEND_RECEIVED:
- if (activity.indicateReceived()) {
+ if (mIndicateReceived) {
viewHolder.indicatorReceived.setVisibility(View.VISIBLE);
}
break;
case Message.STATUS_SEND_DISPLAYED:
- if (activity.indicateReceived()) {
+ if (mIndicateReceived) {
viewHolder.indicatorReceived.setVisibility(View.VISIBLE);
}
break;
@@ -162,11 +164,12 @@ public class MessageAdapter extends ArrayAdapter<Message> {
if (error && type == SENT) {
viewHolder.time.setTextColor(activity.getWarningTextColor());
} else {
- viewHolder.time.setTextColor(this.getMessageTextColor(type,false));
+ viewHolder.time.setTextColor(this.getMessageTextColor(darkBackground,false));
}
if (message.getEncryption() == Message.ENCRYPTION_NONE) {
viewHolder.indicator.setVisibility(View.GONE);
} else {
+ viewHolder.indicator.setImageResource(darkBackground ? R.drawable.ic_secure_indicator_white : R.drawable.ic_secure_indicator);
viewHolder.indicator.setVisibility(View.VISIBLE);
if (message.getEncryption() == Message.ENCRYPTION_AXOLOTL) {
XmppAxolotlSession.Trust trust = message.getConversation()
@@ -178,18 +181,18 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.indicator.setAlpha(1.0f);
} else {
viewHolder.indicator.clearColorFilter();
- if (type == SENT) {
- viewHolder.indicator.setAlpha(0.57f);
- } else {
+ if (darkBackground) {
viewHolder.indicator.setAlpha(0.7f);
+ } else {
+ viewHolder.indicator.setAlpha(0.57f);
}
}
} else {
viewHolder.indicator.clearColorFilter();
- if (type == SENT) {
- viewHolder.indicator.setAlpha(0.57f);
- } else {
+ if (darkBackground) {
viewHolder.indicator.setAlpha(0.7f);
+ } else {
+ viewHolder.indicator.setAlpha(0.57f);
}
}
}
@@ -223,19 +226,19 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
}
- private void displayInfoMessage(ViewHolder viewHolder, String text, int type) {
+ private void displayInfoMessage(ViewHolder viewHolder, String text, boolean darkBackground) {
if (viewHolder.download_button != null) {
viewHolder.download_button.setVisibility(View.GONE);
}
viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(text);
- viewHolder.messageBody.setTextColor(getMessageTextColor(type,false));
+ viewHolder.messageBody.setTextColor(getMessageTextColor(darkBackground, false));
viewHolder.messageBody.setTypeface(null, Typeface.ITALIC);
viewHolder.messageBody.setTextIsSelectable(false);
}
- private void displayDecryptionFailed(ViewHolder viewHolder, int type) {
+ private void displayDecryptionFailed(ViewHolder viewHolder, boolean darkBackground) {
if (viewHolder.download_button != null) {
viewHolder.download_button.setVisibility(View.GONE);
}
@@ -243,7 +246,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(getContext().getString(
R.string.decryption_failed));
- viewHolder.messageBody.setTextColor(getMessageTextColor(type,false));
+ viewHolder.messageBody.setTextColor(getMessageTextColor(darkBackground, false));
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
viewHolder.messageBody.setTextIsSelectable(false);
}
@@ -261,7 +264,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.messageBody.setText(span);
}
- private void displayTextMessage(final ViewHolder viewHolder, final Message message, int type) {
+ private void displayTextMessage(final ViewHolder viewHolder, final Message message, boolean darkBackground) {
if (viewHolder.download_button != null) {
viewHolder.download_button.setVisibility(View.GONE);
}
@@ -303,7 +306,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
final Spannable span = new SpannableString(privateMarker + " "
+ formattedBody);
- span.setSpan(new ForegroundColorSpan(getMessageTextColor(type,false)), 0, privateMarker
+ span.setSpan(new ForegroundColorSpan(getMessageTextColor(darkBackground,false)), 0, privateMarker
.length(), Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
span.setSpan(new StyleSpan(Typeface.BOLD), 0,
privateMarker.length(),
@@ -318,7 +321,8 @@ public class MessageAdapter extends ArrayAdapter<Message> {
} else {
viewHolder.messageBody.setText("");
}
- viewHolder.messageBody.setTextColor(this.getMessageTextColor(type,true));
+ viewHolder.messageBody.setTextColor(this.getMessageTextColor(darkBackground, true));
+ viewHolder.messageBody.setLinkTextColor(this.getMessageTextColor(darkBackground,true));
viewHolder.messageBody.setTypeface(null, Typeface.NORMAL);
viewHolder.messageBody.setTextIsSelectable(true);
}
@@ -388,7 +392,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
scalledH = (int) (params.height / ((double) params.width / target));
}
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(scalledW, scalledH);
- layoutParams.setMargins(0, (int)(metrics.density * 4), 0, (int)(metrics.density * 4));
+ layoutParams.setMargins(0, (int) (metrics.density * 4), 0, (int) (metrics.density * 4));
viewHolder.image.setLayoutParams(layoutParams);
activity.loadBitmap(message, viewHolder.image);
viewHolder.image.setOnClickListener(new OnClickListener() {
@@ -404,6 +408,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
@Override
public View getView(int position, View view, ViewGroup parent) {
final Message message = getItem(position);
+ final boolean isInValidSession = message.isValidInSession();
final Conversation conversation = message.getConversation();
final Account account = conversation.getAccount();
final int type = getItemViewType(position);
@@ -468,6 +473,8 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
}
+ boolean darkBackground = (type == RECEIVED && (!isInValidSession || !mUseWhiteBackground));
+
if (type == STATUS) {
if (conversation.getMode() == Conversation.MODE_SINGLE) {
viewHolder.contact_picture.setImageBitmap(activity
@@ -497,7 +504,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
public void onClick(View v) {
if (MessageAdapter.this.mOnContactPictureClickedListener != null) {
MessageAdapter.this.mOnContactPictureClickedListener
- .onContactPictureClicked(message);
+ .onContactPictureClicked(message);
}
}
@@ -509,7 +516,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
public boolean onLongClick(View v) {
if (MessageAdapter.this.mOnContactPictureLongClickedListener != null) {
MessageAdapter.this.mOnContactPictureLongClickedListener
- .onContactPictureLongClicked(message);
+ .onContactPictureLongClicked(message);
return true;
} else {
return false;
@@ -524,7 +531,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
} else if (transferable.getStatus() == Transferable.STATUS_OFFER_CHECK_FILESIZE) {
displayDownloadableMessage(viewHolder, message, activity.getString(R.string.check_x_filesize, UIHelper.getFileDescriptionString(activity, message)));
} else {
- displayInfoMessage(viewHolder, UIHelper.getMessagePreview(activity, message).first,type);
+ displayInfoMessage(viewHolder, UIHelper.getMessagePreview(activity, message).first,darkBackground);
}
} else if (message.getType() == Message.TYPE_IMAGE && message.getEncryption() != Message.ENCRYPTION_PGP && message.getEncryption() != Message.ENCRYPTION_DECRYPTION_FAILED) {
displayImageMessage(viewHolder, message);
@@ -536,9 +543,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
} else if (message.getEncryption() == Message.ENCRYPTION_PGP) {
if (activity.hasPgp()) {
- displayInfoMessage(viewHolder,activity.getString(R.string.encrypted_message),type);
+ displayInfoMessage(viewHolder,activity.getString(R.string.encrypted_message),darkBackground);
} else {
- displayInfoMessage(viewHolder,activity.getString(R.string.install_openkeychain),type);
+ displayInfoMessage(viewHolder,activity.getString(R.string.install_openkeychain),darkBackground);
if (viewHolder != null) {
viewHolder.message_box
.setOnClickListener(new OnClickListener() {
@@ -551,7 +558,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
}
}
} else if (message.getEncryption() == Message.ENCRYPTION_DECRYPTION_FAILED) {
- displayDecryptionFailed(viewHolder,type);
+ displayDecryptionFailed(viewHolder,darkBackground);
} else {
if (GeoHelper.isGeoUri(message.getBody())) {
displayLocationMessage(viewHolder,message);
@@ -560,19 +567,23 @@ public class MessageAdapter extends ArrayAdapter<Message> {
} else if (message.treatAsDownloadable() == Message.Decision.MUST) {
displayDownloadableMessage(viewHolder, message, activity.getString(R.string.check_x_filesize, UIHelper.getFileDescriptionString(activity, message)));
} else {
- displayTextMessage(viewHolder, message, type);
+ displayTextMessage(viewHolder, message, darkBackground);
}
}
if (type == RECEIVED) {
- if(message.isValidInSession()) {
- viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received);
+ if(isInValidSession) {
+ if (mUseWhiteBackground) {
+ viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_white);
+ } else {
+ viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received);
+ }
} else {
viewHolder.message_box.setBackgroundResource(R.drawable.message_bubble_received_warning);
}
}
- displayStatus(viewHolder, message, type);
+ displayStatus(viewHolder, message, type, darkBackground);
return view;
}
@@ -616,12 +627,17 @@ public class MessageAdapter extends ArrayAdapter<Message> {
Toast.makeText(activity,R.string.no_application_found_to_display_location,Toast.LENGTH_SHORT).show();
}
+ public void updatePreferences() {
+ this.mIndicateReceived = activity.indicateReceived();
+ this.mUseWhiteBackground = activity.useWhiteBackground();
+ }
+
public interface OnContactPictureClicked {
- public void onContactPictureClicked(Message message);
+ void onContactPictureClicked(Message message);
}
public interface OnContactPictureLongClicked {
- public void onContactPictureLongClicked(Message message);
+ void onContactPictureLongClicked(Message message);
}
private static class ViewHolder {
diff --git a/src/main/java/eu/siacs/conversations/utils/FileUtils.java b/src/main/java/eu/siacs/conversations/utils/FileUtils.java
index a13300d43..c29841112 100644
--- a/src/main/java/eu/siacs/conversations/utils/FileUtils.java
+++ b/src/main/java/eu/siacs/conversations/utils/FileUtils.java
@@ -104,15 +104,17 @@ public class FileUtils {
};
try {
- cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,
- null);
+ cursor = context.getContentResolver().query(uri, projection, selection, selectionArgs,null);
if (cursor != null && cursor.moveToFirst()) {
final int column_index = cursor.getColumnIndexOrThrow(column);
return cursor.getString(column_index);
}
+ } catch(Exception e) {
+ return null;
} finally {
- if (cursor != null)
+ if (cursor != null) {
cursor.close();
+ }
}
return null;
}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 376858323..bb0c3987b 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -318,7 +318,6 @@ public class XmppConnection implements Runnable {
Log.d(Config.LOGTAG, account.getJid().toBareJid().toString()
+ ": stream management(" + smVersion + ") enabled");
}
- this.lastSessionStarted = SystemClock.elapsedRealtime();
this.stanzasReceived = 0;
final RequestPacket r = new RequestPacket(smVersion);
tagWriter.writeStanzaAsync(r);
@@ -473,29 +472,33 @@ public class XmppConnection implements Runnable {
this.jingleListener.onJinglePacketReceived(account,(JinglePacket) packet);
}
} else {
+ OnIqPacketReceived callback = null;
synchronized (this.packetCallbacks) {
if (packetCallbacks.containsKey(packet.getId())) {
final Pair<IqPacket, OnIqPacketReceived> packetCallbackDuple = packetCallbacks.get(packet.getId());
// Packets to the server should have responses from the server
if (packetCallbackDuple.first.toServer(account)) {
if (packet.fromServer(account)) {
- packetCallbackDuple.second.onIqPacketReceived(account, packet);
+ callback = packetCallbackDuple.second;
packetCallbacks.remove(packet.getId());
} else {
Log.e(Config.LOGTAG, account.getJid().toBareJid().toString() + ": ignoring spoofed iq packet");
}
} else {
if (packet.getFrom().equals(packetCallbackDuple.first.getTo())) {
- packetCallbackDuple.second.onIqPacketReceived(account, packet);
+ callback = packetCallbackDuple.second;
packetCallbacks.remove(packet.getId());
} else {
Log.e(Config.LOGTAG, account.getJid().toBareJid().toString() + ": ignoring spoofed iq packet");
}
}
} else if (packet.getType() == IqPacket.TYPE.GET || packet.getType() == IqPacket.TYPE.SET) {
- this.unregisteredIqListener.onIqPacketReceived(account, packet);
+ callback = this.unregisteredIqListener;
}
}
+ if (callback != null) {
+ callback.onIqPacketReceived(account,packet);
+ }
}
}
@@ -784,6 +787,7 @@ public class XmppConnection implements Runnable {
sendServiceDiscoveryInfo(account.getJid().toBareJid());
sendServiceDiscoveryItems(account.getServer());
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": online with resource " + account.getResource());
+ this.lastSessionStarted = SystemClock.elapsedRealtime();
changeStatus(Account.State.ONLINE);
if (bindListener != null) {
bindListener.onBind(account);
@@ -954,7 +958,7 @@ public class XmppConnection implements Runnable {
AbstractAcknowledgeableStanza stanza = (AbstractAcknowledgeableStanza) packet;
++stanzasSent;
this.mStanzaQueue.put(stanzasSent, stanza);
- if (stanza instanceof MessagePacket && stanza.getId() != null && this.streamId != null) {
+ if (stanza instanceof MessagePacket && stanza.getId() != null && getFeatures().sm()) {
if (Config.EXTENDED_SM_LOGGING) {
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": requesting ack for message stanza #" + stanzasSent);
}
@@ -1100,12 +1104,7 @@ public class XmppConnection implements Runnable {
}
public long getLastSessionEstablished() {
- final long diff;
- if (this.lastSessionStarted == 0) {
- diff = SystemClock.elapsedRealtime() - this.lastConnect;
- } else {
- diff = SystemClock.elapsedRealtime() - this.lastSessionStarted;
- }
+ final long diff = SystemClock.elapsedRealtime() - this.lastSessionStarted;
return System.currentTimeMillis() - diff;
}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java
index b32111584..e832d3f58 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleTransport.java
@@ -1,31 +1,5 @@
package eu.siacs.conversations.xmpp.jingle;
-import android.util.Log;
-import android.util.Pair;
-
-import org.bouncycastle.crypto.engines.AESEngine;
-import org.bouncycastle.crypto.modes.AEADBlockCipher;
-import org.bouncycastle.crypto.modes.GCMBlockCipher;
-import org.bouncycastle.crypto.params.AEADParameters;
-import org.bouncycastle.crypto.params.KeyParameter;
-
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.security.InvalidAlgorithmParameterException;
-import java.security.InvalidKeyException;
-import java.security.NoSuchAlgorithmException;
-
-import javax.crypto.Cipher;
-import javax.crypto.CipherInputStream;
-import javax.crypto.CipherOutputStream;
-import javax.crypto.NoSuchPaddingException;
-import javax.crypto.spec.IvParameterSpec;
-import javax.crypto.spec.SecretKeySpec;
-
-import eu.siacs.conversations.Config;
import eu.siacs.conversations.entities.DownloadableFile;
public abstract class JingleTransport {
diff --git a/src/main/res/drawable-hdpi/message_bubble_received.9.png b/src/main/res/drawable-hdpi/message_bubble_received.9.png
index 1a496771e..4445ca04a 100644
--- a/src/main/res/drawable-hdpi/message_bubble_received.9.png
+++ b/src/main/res/drawable-hdpi/message_bubble_received.9.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png
index 9cd2f825d..1bd8cb51f 100644
--- a/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png
+++ b/src/main/res/drawable-hdpi/message_bubble_received_warning.9.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/message_bubble_received_white.9.png b/src/main/res/drawable-hdpi/message_bubble_received_white.9.png
new file mode 100644
index 000000000..15d27cca8
--- /dev/null
+++ b/src/main/res/drawable-hdpi/message_bubble_received_white.9.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/message_bubble_sent.9.png b/src/main/res/drawable-hdpi/message_bubble_sent.9.png
index 2bb4e04f6..5d79264e9 100644
--- a/src/main/res/drawable-hdpi/message_bubble_sent.9.png
+++ b/src/main/res/drawable-hdpi/message_bubble_sent.9.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_received.9.png b/src/main/res/drawable-mdpi/message_bubble_received.9.png
index 7e134402f..ba63820b2 100644
--- a/src/main/res/drawable-mdpi/message_bubble_received.9.png
+++ b/src/main/res/drawable-mdpi/message_bubble_received.9.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png
index 38f75e051..6523e9a14 100644
--- a/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png
+++ b/src/main/res/drawable-mdpi/message_bubble_received_warning.9.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_received_white.9.png b/src/main/res/drawable-mdpi/message_bubble_received_white.9.png
new file mode 100644
index 000000000..2abd4fe1b
--- /dev/null
+++ b/src/main/res/drawable-mdpi/message_bubble_received_white.9.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/message_bubble_sent.9.png b/src/main/res/drawable-mdpi/message_bubble_sent.9.png
index b42664a85..dd23cf7d7 100644
--- a/src/main/res/drawable-mdpi/message_bubble_sent.9.png
+++ b/src/main/res/drawable-mdpi/message_bubble_sent.9.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_received.9.png b/src/main/res/drawable-xhdpi/message_bubble_received.9.png
index dc8ee5346..aa0fc16e4 100644
--- a/src/main/res/drawable-xhdpi/message_bubble_received.9.png
+++ b/src/main/res/drawable-xhdpi/message_bubble_received.9.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png
index b5be808f8..79e6e1fdf 100644
--- a/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png
+++ b/src/main/res/drawable-xhdpi/message_bubble_received_warning.9.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_received_white.9.png b/src/main/res/drawable-xhdpi/message_bubble_received_white.9.png
new file mode 100644
index 000000000..771c3ff43
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/message_bubble_received_white.9.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xhdpi/message_bubble_sent.9.png
index f1c462326..9e01ebaca 100644
--- a/src/main/res/drawable-xhdpi/message_bubble_sent.9.png
+++ b/src/main/res/drawable-xhdpi/message_bubble_sent.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received.9.png
index 6ce844871..0af666695 100644
--- a/src/main/res/drawable-xxhdpi/message_bubble_received.9.png
+++ b/src/main/res/drawable-xxhdpi/message_bubble_received.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png
index a31818698..e128d58a6 100644
--- a/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png
+++ b/src/main/res/drawable-xxhdpi/message_bubble_received_warning.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_received_white.9.png b/src/main/res/drawable-xxhdpi/message_bubble_received_white.9.png
new file mode 100644
index 000000000..94baefed9
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/message_bubble_received_white.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png
index 9f36a6494..de4f8784b 100644
--- a/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png
+++ b/src/main/res/drawable-xxhdpi/message_bubble_sent.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png
index e7fa6754b..8a35671d4 100644
--- a/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png
+++ b/src/main/res/drawable-xxxhdpi/message_bubble_received.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png
index 398e53a2d..2b4e08b2b 100644
--- a/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png
+++ b/src/main/res/drawable-xxxhdpi/message_bubble_received_warning.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_received_white.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_received_white.9.png
new file mode 100644
index 000000000..6ea852cec
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/message_bubble_received_white.9.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png b/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png
index be428cd2e..5cbfdbb4b 100644
--- a/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png
+++ b/src/main/res/drawable-xxxhdpi/message_bubble_sent.9.png
Binary files differ
diff --git a/src/main/res/menu/encryption_choices.xml b/src/main/res/menu/encryption_choices.xml
index 9af2cd346..ab42a206b 100644
--- a/src/main/res/menu/encryption_choices.xml
+++ b/src/main/res/menu/encryption_choices.xml
@@ -4,7 +4,7 @@
<group android:checkableBehavior="single" >
<item
android:id="@+id/encryption_choice_none"
- android:title="@string/encryption_choice_none"/>
+ android:title="@string/encryption_choice_unencrypted"/>
<item
android:id="@+id/encryption_choice_axolotl"
android:title="@string/encryption_choice_omemo"/>
diff --git a/src/main/res/values-ar-rEG/strings.xml b/src/main/res/values-ar-rEG/strings.xml
index 0d85e55c5..b8a18cde1 100644
--- a/src/main/res/values-ar-rEG/strings.xml
+++ b/src/main/res/values-ar-rEG/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">حذف الرسائل</string>
<string name="also_end_conversation">انهاء هذه المحادثة بعد الكلمات</string>
<string name="choose_presence">اختيار ظهورك لجهات الإتصال</string>
- <string name="send_plain_text_message">ارسال رسالة غير مشفّرة</string>
<string name="send_otr_message">OTRارساله رساله مشفره عبر</string>
<string name="send_pgp_message">OpenPGPارساله رساله مشفره عبر</string>
<string name="your_nick_has_been_changed">تم تغيير لقبك بنجاح</string>
@@ -128,7 +127,6 @@
<string name="account_status_regis_conflict">اسم المستخدم مستخدم من قبل</string>
<string name="account_status_regis_success">تم تسجيل حسابك بنجاح</string>
<string name="account_status_regis_not_sup">تسجيل الحسابات غير متاح على هذا السرفر</string>
- <string name="encryption_choice_none">رساله عادية</string>
<string name="encryption_choice_otr">OTRرسالة مشفرة عبر</string>
<string name="encryption_choice_pgp">OpenPGPرسالة مشفرة عبر</string>
<string name="mgmt_account_edit">تعديل الحساب</string>
diff --git a/src/main/res/values-bg/strings.xml b/src/main/res/values-bg/strings.xml
index caea7a090..57e63e423 100644
--- a/src/main/res/values-bg/strings.xml
+++ b/src/main/res/values-bg/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Изтриване на съобщенията</string>
<string name="also_end_conversation">Този разговор да приключи след това</string>
<string name="choose_presence">Изберете присъствие за контакта</string>
- <string name="send_plain_text_message">Изпр. на обикновено текстово съобщение</string>
<string name="send_otr_message">Изпр. на съобщение, шифр. чрез OTP</string>
<string name="send_omemo_message">Изпр. на съобщение, шифр. чрез OMEMO</string>
<string name="send_pgp_message">Изпр. на съобщение, шифр. чрез OpenPGP</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">Сървърът не поддържа регистриране</string>
<string name="account_status_security_error">Грешка в сигурността</string>
<string name="account_status_incompatible_server">Несъвместим сървър</string>
- <string name="encryption_choice_none">Обикновен текст</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-ca/strings.xml b/src/main/res/values-ca/strings.xml
index 643ff62fb..cfb2a8f34 100644
--- a/src/main/res/values-ca/strings.xml
+++ b/src/main/res/values-ca/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Esborrar missatges</string>
<string name="also_end_conversation">Finalitzar aquesta conversa més tard</string>
<string name="choose_presence">Selecciona recurs del contacte</string>
- <string name="send_plain_text_message">Enviar missatge de text</string>
<string name="send_otr_message">Enviar missatge xifrat amb OTR</string>
<string name="send_pgp_message">Enviar missatge xifrat amb OpenPGP</string>
<string name="your_nick_has_been_changed">El teu sobrenom s\'ha modificat</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">El servidor no admet el registre</string>
<string name="account_status_security_error">Error de seguretat</string>
<string name="account_status_incompatible_server">Servidor incompatible</string>
- <string name="encryption_choice_none">Text pla</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Edita compte</string>
diff --git a/src/main/res/values-cs/strings.xml b/src/main/res/values-cs/strings.xml
index c7e103c0f..46b90ca8e 100644
--- a/src/main/res/values-cs/strings.xml
+++ b/src/main/res/values-cs/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Smazat zprávy</string>
<string name="also_end_conversation">Poté ukončit i tuto konverzaci</string>
<string name="choose_presence">Vybrat aktualizaci stavu pro kontakt</string>
- <string name="send_plain_text_message">Poslat textovou zprávu</string>
<string name="send_otr_message">Poslat OTR šifrovanou zprávu</string>
<string name="send_omemo_message">Poslat OMEMO šifrovanou zprávu</string>
<string name="send_pgp_message">Poslat OpenPGP šifrovanou zprávu</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">Server nepodporuje registrace</string>
<string name="account_status_security_error">Bezpečnostní chyba</string>
<string name="account_status_incompatible_server">Nekompatibilní server</string>
- <string name="encryption_choice_none">Čistý text</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-de/strings.xml b/src/main/res/values-de/strings.xml
index 1be779f3f..4e463e593 100644
--- a/src/main/res/values-de/strings.xml
+++ b/src/main/res/values-de/strings.xml
@@ -76,7 +76,7 @@
<string name="delete_messages">Nachrichten löschen</string>
<string name="also_end_conversation">Diese Unterhaltung danach beenden</string>
<string name="choose_presence">Ressource des Kontakts auswählen</string>
- <string name="send_plain_text_message">Normal schreiben…</string>
+ <string name="send_unencrypted_message">Sende unverschlüsselte Nachricht</string>
<string name="send_otr_message">OTR-verschlüsselt schreiben…</string>
<string name="send_omemo_message">OMEMO-verschlüsselt schreiben…</string>
<string name="send_pgp_message">OpenPGP-verschlüsselt schreiben…</string>
@@ -150,7 +150,7 @@
<string name="account_status_regis_not_sup">Der Server unterstützt keine Registrierung</string>
<string name="account_status_security_error">Sicherheitsfehler</string>
<string name="account_status_incompatible_server">Inkompatibler Server</string>
- <string name="encryption_choice_none">Klartext</string>
+ <string name="encryption_choice_unencrypted">Unverschlüsselt</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
@@ -189,6 +189,7 @@
<string name="server_info_roster_version">XEP-0237: Roster Versioning</string>
<string name="server_info_stream_management">XEP-0198: Stream Management</string>
<string name="server_info_pep">XEP-0163: PEP (Avatare)</string>
+ <string name="server_info_http_upload">XEP-xxxx: HTTP File Upload</string>
<string name="server_info_available">ja</string>
<string name="server_info_unavailable">nein</string>
<string name="missing_public_keys">Öffentlicher Schlüssel fehlt</string>
@@ -368,6 +369,7 @@
<string name="purge_key">Schlüssel löschen</string>
<string name="purge_key_desc_part1">Soll dieser Schlüssel gelöscht werden?</string>
<string name="purge_key_desc_part2">Dieser Vorgang kann nicht rückgängig gemacht werden und es kann nie wieder eine Verbindung mit diesem Schlüssel hergestellt werden.</string>
+ <string name="error_trustkeys_title">Fehler</string>
<string name="fetching_history_from_server">Lade Chatverlauf…</string>
<string name="no_more_history_on_server">Keine weiteren Nachrichten vorhanden</string>
<string name="updating">Aktualisiere…</string>
diff --git a/src/main/res/values-el/strings.xml b/src/main/res/values-el/strings.xml
index fbafcaaa2..49f1b796f 100644
--- a/src/main/res/values-el/strings.xml
+++ b/src/main/res/values-el/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Διαγραφή μηνυμάτων</string>
<string name="also_end_conversation">Τερματισμός αυτής της συζήτησης αμέσως μετά</string>
<string name="choose_presence">Επιλέξτε παρουσία για επικοινωνία</string>
- <string name="send_plain_text_message">Αποστολή απλού μηνύματος κειμένου</string>
<string name="send_otr_message">Αποστολή κρυπτογραφημένου μηνύματος OTR</string>
<string name="send_pgp_message">Αποστολή κρυπτογραφημένου μηνύματος OpenPGP</string>
<string name="your_nick_has_been_changed">Το ψευδώνυμό σας έχει αλλάξει</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Ο διακομιστής δεν υποστηρίζει εγγραφή</string>
<string name="account_status_security_error">Σφάλμα ασφάλειας</string>
<string name="account_status_incompatible_server">Μη συμβατός διακομιστής</string>
- <string name="encryption_choice_none">Απλό κείμενο</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Επεξεργασία λογαριασμού</string>
diff --git a/src/main/res/values-es/strings.xml b/src/main/res/values-es/strings.xml
index 313b203ca..ca7c0c63d 100644
--- a/src/main/res/values-es/strings.xml
+++ b/src/main/res/values-es/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Borrar mensajes</string>
<string name="also_end_conversation">Además, terminar esta conversación</string>
<string name="choose_presence">Selecciona recurso del contacto</string>
- <string name="send_plain_text_message">Enviar mensaje de texto</string>
<string name="send_otr_message">Enviar mensaje cifrado con OTR</string>
<string name="send_omemo_message">Enviar mensaje cifrado con OMEMO </string>
<string name="send_pgp_message">Enviar mensaje cifrado con OpenPGP</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">El servidor no soporta registros</string>
<string name="account_status_security_error">Error de seguridad</string>
<string name="account_status_incompatible_server">Servidor incompatible</string>
- <string name="encryption_choice_none">Texto plano</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-eu/strings.xml b/src/main/res/values-eu/strings.xml
index a19cd111e..656dd6d51 100644
--- a/src/main/res/values-eu/strings.xml
+++ b/src/main/res/values-eu/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Mezuak ezabatu</string>
<string name="also_end_conversation">Elkarrizketa hau jarraian amaitu</string>
<string name="choose_presence">Hautatu agerpena kontaktuarentzat</string>
- <string name="send_plain_text_message">Testu mezua bidali</string>
<string name="send_otr_message">OTRz enkriptatutako mezua bidali</string>
<string name="send_omemo_message">OMEMOz enkriptatutako mezua bidali</string>
<string name="send_pgp_message">OpenPGPz enkriptatutako mezua bidali</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">Zerbitzariak ez du erregistratzea onartzen</string>
<string name="account_status_security_error">Segurtasun akatsa</string>
<string name="account_status_incompatible_server">Zerbitzari ez bateragarria</string>
- <string name="encryption_choice_none">Testu laua</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-fr/strings.xml b/src/main/res/values-fr/strings.xml
index d8849b46f..167a6d8d3 100644
--- a/src/main/res/values-fr/strings.xml
+++ b/src/main/res/values-fr/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Supprimer les messages</string>
<string name="also_end_conversation">Terminer plus tard cette conversation</string>
<string name="choose_presence">Choisir le status de présence</string>
- <string name="send_plain_text_message">Envoyer un message</string>
<string name="send_otr_message">Envoyer un message sécurisé par OTR</string>
<string name="send_pgp_message">Envoyer un message sécurisé par OpenPGP</string>
<string name="your_nick_has_been_changed">Votre identifiant a été changé</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Le serveur ne permet pas l\'enregistrement</string>
<string name="account_status_security_error">Erreur de sécurité</string>
<string name="account_status_incompatible_server">Serveur incompatible</string>
- <string name="encryption_choice_none">Texte clair</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Modifier le compte</string>
diff --git a/src/main/res/values-gl/strings.xml b/src/main/res/values-gl/strings.xml
index 6a6b23c1d..972a7bfea 100644
--- a/src/main/res/values-gl/strings.xml
+++ b/src/main/res/values-gl/strings.xml
@@ -44,7 +44,6 @@
<string name="delete_messages">Borrar mensaxes</string>
<string name="also_end_conversation">Terminar esta conversa máis tarde</string>
<string name="choose_presence">Selecciona recurso del contacto</string>
- <string name="send_plain_text_message">Enviar mensaxe de texto</string>
<string name="send_otr_message">Enviar mensaxe cifrado con OTR</string>
<string name="send_pgp_message">Enviar mensaxe cifrado con OpenPGP</string>
<string name="your_nick_has_been_changed">Modificouse o teu apodo</string>
@@ -107,7 +106,6 @@
<string name="account_status_regis_conflict">O identificador xa está en uso</string>
<string name="account_status_regis_success">Rexistro completado</string>
<string name="account_status_regis_not_sup">O servidor non soporta rexistros</string>
- <string name="encryption_choice_none">Texto plano</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Editar conta</string>
diff --git a/src/main/res/values-id/strings.xml b/src/main/res/values-id/strings.xml
index ea818150c..61b8c2964 100644
--- a/src/main/res/values-id/strings.xml
+++ b/src/main/res/values-id/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Hapus pesan</string>
<string name="also_end_conversation">Akhiri percakapan setelahnya</string>
<string name="choose_presence">Pilih kehadiran untuk kontak</string>
- <string name="send_plain_text_message">Kirim pesan teks biasa</string>
<string name="send_otr_message">Kirim pesan terenskripsi OTR</string>
<string name="send_pgp_message">Kirim pesan terenskripsi OpenPGP</string>
<string name="your_nick_has_been_changed">Nick kamu telah dirubah</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Server tidak mendukung pendaftaran akun.</string>
<string name="account_status_security_error">Kesalahan keamanan</string>
<string name="account_status_incompatible_server">Server tidak cocok</string>
- <string name="encryption_choice_none">Teks biasa</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Ubah akun</string>
@@ -202,6 +200,8 @@
<string name="reception_failed">Penerimaan gagal</string>
<string name="your_fingerprint">Fingerprint Anda</string>
<string name="otr_fingerprint">OTR fingerprint</string>
+ <string name="other_devices">Perangkat lainnya</string>
+ <string name="done">Selesai</string>
<string name="verify">Verifikasi</string>
<string name="decrypt">Deskripsi</string>
<string name="conferences">Conferences</string>
@@ -287,10 +287,12 @@
<string name="conference_kicked">Anda telah ditendang dari conference ini</string>
<string name="using_account">menggunakan akun %s</string>
<string name="not_connected_try_again">Anda tidak terhubung. Coba lagi nanti</string>
+ <string name="check_x_filesize">Cek %s ukuran</string>
<string name="message_options">Opsi pesan</string>
<string name="copy_text">Salin teks</string>
<string name="copy_original_url">Salin URL asli</string>
<string name="send_again">Kirim lagi</string>
+ <string name="file_url">URL Berkas</string>
<string name="message_text">Pesan teks</string>
<string name="url_copied_to_clipboard">URL disalin ke clipboard</string>
<string name="message_copied_to_clipboard">Pesan disalin ke clipboard</string>
@@ -345,6 +347,7 @@
<string name="reset">Ulang</string>
<string name="account_image_description">Avatar akun</string>
<string name="copy_otr_clipboard_description">Salin OTR fingerprint ke clipboard</string>
+ <string name="clear_other_devices">Bersihkan perangkat</string>
<string name="fetching_history_from_server">Mengambil data dari server</string>
<string name="no_more_history_on_server">Tidak ada data lagi di server</string>
<string name="updating">Merubah...</string>
@@ -442,4 +445,13 @@
<string name="none">Tak satupun</string>
<string name="recently_used">Maling sering digunakan</string>
<string name="choose_quick_action">Pilih aksi cepat</string>
+ <string name="search_for_contacts_or_groups">Cari grup atau daftar kontak</string>
+ <string name="send_private_message">Kirim pesan pribadi</string>
+ <string name="user_has_left_conference">%s meninggalkan conference!</string>
+ <string name="username">Username</string>
+ <string name="username_hint">Username</string>
+ <string name="invalid_username">Username ini tidak valid</string>
+ <string name="download_failed_server_not_found">Unduhan gagal: Server tidak ditemukan</string>
+ <string name="download_failed_file_not_found">Unduh gagal: Berkas tidak ditemukan</string>
+ <string name="download_failed_could_not_connect">Unduhan gagal: Tidak dapat terhubung ke host</string>
</resources>
diff --git a/src/main/res/values-it/strings.xml b/src/main/res/values-it/strings.xml
index 0d5581c7e..5c8e3aebb 100644
--- a/src/main/res/values-it/strings.xml
+++ b/src/main/res/values-it/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Elimina messaggi</string>
<string name="also_end_conversation">Termina questa conversazione in seguito</string>
<string name="choose_presence">Choose presence to contact</string>
- <string name="send_plain_text_message">Messaggio non cifrato</string>
<string name="send_otr_message">Messaggio OTR</string>
<string name="send_pgp_message">Messaggio OpenPGP</string>
<string name="your_nick_has_been_changed">Il tuo nome utente è stato cambiato</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Il Server non supporta la registrazione</string>
<string name="account_status_security_error">Errore di sicurezza</string>
<string name="account_status_incompatible_server">Server non compatibile</string>
- <string name="encryption_choice_none">Testo semplice</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Modifica utente</string>
diff --git a/src/main/res/values-iw/strings.xml b/src/main/res/values-iw/strings.xml
index 8eeaab6b0..68daf846e 100644
--- a/src/main/res/values-iw/strings.xml
+++ b/src/main/res/values-iw/strings.xml
@@ -62,7 +62,6 @@
<string name="delete_messages">מחק הודעות</string>
<string name="also_end_conversation">סיים את דיון זה לאחר מכן</string>
<string name="choose_presence">בחר נוכחות לאיש קשר</string>
- <string name="send_plain_text_message">שלח הודעת טקסט גלוי</string>
<string name="send_otr_message">שלח הודעה מוצפנת OTR</string>
<string name="send_pgp_message">שלח הודעה מוצפנת OpenPGP</string>
<string name="your_nick_has_been_changed">שם כינוי שלך השתנה</string>
@@ -130,7 +129,6 @@
<string name="account_status_regis_conflict">שם משתמש כבר מצוי בשימוש</string>
<string name="account_status_regis_success">הרשמה הושלמה</string>
<string name="account_status_regis_not_sup">שרת לא תומך הרשמה</string>
- <string name="encryption_choice_none">טקסט גלוי</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">ערוך חשבון</string>
diff --git a/src/main/res/values-ja/strings.xml b/src/main/res/values-ja/strings.xml
index 82c9c73cb..7bec1334d 100644
--- a/src/main/res/values-ja/strings.xml
+++ b/src/main/res/values-ja/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">メッセージを削除</string>
<string name="also_end_conversation">その後、この会話を終了</string>
<string name="choose_presence">連絡する参加を選択</string>
- <string name="send_plain_text_message">プレーンテキストを送信</string>
<string name="send_otr_message">OTR 暗号化メッセージを送信</string>
<string name="send_omemo_message">OMEMO 暗号化メッセージを送信</string>
<string name="send_pgp_message">OpenPGP 暗号化メッセージを送信</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">サーバーが登録をサポートしていません</string>
<string name="account_status_security_error">セキュリティ エラー</string>
<string name="account_status_incompatible_server">互換性のないサーバー</string>
- <string name="encryption_choice_none">プレーンテキスト</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-ko/strings.xml b/src/main/res/values-ko/strings.xml
index 5c51b293a..40ec19098 100644
--- a/src/main/res/values-ko/strings.xml
+++ b/src/main/res/values-ko/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">메세지 삭제 </string>
<string name="also_end_conversation">나중에 이 대화 끝내기 </string>
<string name="choose_presence">연락할 프레즌스 선택 </string>
- <string name="send_plain_text_message">평문 메세지 전송 </string>
<string name="send_otr_message">OTR 암호화된 메세지 전송 </string>
<string name="send_pgp_message">OpenPGP 암호화된 메세지 전송 </string>
<string name="your_nick_has_been_changed">닉네임이 변경되었습니다 </string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">서버가 등록을 지원하지 않습니다</string>
<string name="account_status_security_error">보안 오류 </string>
<string name="account_status_incompatible_server">호환되지 않는 서버 </string>
- <string name="encryption_choice_none">평문 </string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP </string>
<string name="mgmt_account_edit">계정 편집 </string>
diff --git a/src/main/res/values-nl/strings.xml b/src/main/res/values-nl/strings.xml
index 6bbf61d24..57ab13b59 100644
--- a/src/main/res/values-nl/strings.xml
+++ b/src/main/res/values-nl/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Berichten verwijderen</string>
<string name="also_end_conversation">Beëindig dit gesprek na afloop</string>
<string name="choose_presence">Kies aanwezigheid om te tonen aan contact</string>
- <string name="send_plain_text_message">Verstuur onversleuteld bericht</string>
<string name="send_otr_message">Verstuur OTR-versleuteld bericht</string>
<string name="send_omemo_message">Verstuur OMEMO-versleuteld bericht</string>
<string name="send_pgp_message">Verstuur OpenPGP-versleuteld bericht</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">Server ondersteunt geen registratie</string>
<string name="account_status_security_error">Fout bij beveiliging</string>
<string name="account_status_incompatible_server">Incompatibele server</string>
- <string name="encryption_choice_none">Onversleuteld</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-pl/strings.xml b/src/main/res/values-pl/strings.xml
index a1150e687..a957abb05 100644
--- a/src/main/res/values-pl/strings.xml
+++ b/src/main/res/values-pl/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Usuń wiadomości</string>
<string name="also_end_conversation">Zakończ konwersację po usunięciu historii</string>
<string name="choose_presence">Wybierz widoczność dla kontaktu</string>
- <string name="send_plain_text_message">Wyślij wiadomość jawną</string>
<string name="send_otr_message">Wyślij zaszyfrowaną wiadomość (OTR)</string>
<string name="send_pgp_message">Wyślij zaszyfrowaną wiadomość (OpenPGP)</string>
<string name="your_nick_has_been_changed">Twoja nazwa została zmieniona</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Serwer nie umożliwia rejestracji</string>
<string name="account_status_security_error">Błąd zabezpieczeń</string>
<string name="account_status_incompatible_server">Serwer niekompatybilny</string>
- <string name="encryption_choice_none">Tekst jawny</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Edytuj konto</string>
diff --git a/src/main/res/values-pt/strings.xml b/src/main/res/values-pt/strings.xml
index 08238d66a..6550d9ad0 100644
--- a/src/main/res/values-pt/strings.xml
+++ b/src/main/res/values-pt/strings.xml
@@ -74,7 +74,6 @@
<string name="delete_messages">Remover mensagens</string>
<string name="also_end_conversation">Finalizar essa conversa ao final</string>
<string name="choose_presence">Escolha a presença do contato</string>
- <string name="send_plain_text_message">Enviar mensagem de texto puro</string>
<string name="send_otr_message">Enviar mensagem criptografada com OTR</string>
<string name="send_pgp_message">Enviar mensagem criptografada com OpenPGP</string>
<string name="your_nick_has_been_changed">Seu apelido foi alterado</string>
@@ -137,7 +136,6 @@
<string name="account_status_regis_not_sup">O servidor não aceita o registro</string>
<string name="account_status_security_error">Erro de segurança</string>
<string name="account_status_incompatible_server">Servidor incompatível</string>
- <string name="encryption_choice_none">Texto puro</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Editar conta</string>
diff --git a/src/main/res/values-ro-rRO/strings.xml b/src/main/res/values-ro-rRO/strings.xml
index 9cbfcdbf3..c70ce0520 100644
--- a/src/main/res/values-ro-rRO/strings.xml
+++ b/src/main/res/values-ro-rRO/strings.xml
@@ -75,7 +75,6 @@
<string name="delete_messages">Sterge mesajele</string>
<string name="also_end_conversation">Termina conversatia aceasta dupa</string>
<string name="choose_presence">Alege prezenta pentru a contacta</string>
- <string name="send_plain_text_message">Trimite text necriptat</string>
<string name="send_otr_message">Trimite mesaj criptat cu OTR</string>
<string name="send_pgp_message">Trimite mesaj criptat cu OpenPGP</string>
<string name="your_nick_has_been_changed">Numele tau a fost schimbat</string>
diff --git a/src/main/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml
index 61a51b6a4..59ab3ae5b 100644
--- a/src/main/res/values-ru/strings.xml
+++ b/src/main/res/values-ru/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Удалить сообщения</string>
<string name="also_end_conversation">Завершить беседу</string>
<string name="choose_presence">Укажите статус для контакта</string>
- <string name="send_plain_text_message">Отправить незашифрованное текстовое сообщение</string>
<string name="send_otr_message">Отправить OTR защифрованное сообщение</string>
<string name="send_pgp_message">Отправить OpenPGP защифрованное сообщение</string>
<string name="your_nick_has_been_changed">Ваш псевдоним был изменен</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Сервер не поддерживает регистрацию</string>
<string name="account_status_security_error">Ошибка безопасности</string>
<string name="account_status_incompatible_server">Несовместимый сервер</string>
- <string name="encryption_choice_none">Без шифрования</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Редактировать аккаунт</string>
diff --git a/src/main/res/values-sk/strings.xml b/src/main/res/values-sk/strings.xml
index 4a6e9420b..30c303f7c 100644
--- a/src/main/res/values-sk/strings.xml
+++ b/src/main/res/values-sk/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Vymazať správy</string>
<string name="also_end_conversation">Následne ukončiť aj túto konverzáciu</string>
<string name="choose_presence">Vybrať aktualizáciu stavu pre kontakt</string>
- <string name="send_plain_text_message">Poslať textovú správu</string>
<string name="send_otr_message">Poslať OTR šifrovanú správu</string>
<string name="send_pgp_message">Poslať OpenPGP šifrovanú správu</string>
<string name="your_nick_has_been_changed">Prezývka sa zmenila</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">Server nepodporuje registráciu</string>
<string name="account_status_security_error">Bezpečnostná chyba</string>
<string name="account_status_incompatible_server">Nekompatibilný server</string>
- <string name="encryption_choice_none">Čistý text</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">Upraviť účet</string>
diff --git a/src/main/res/values-sr/strings.xml b/src/main/res/values-sr/strings.xml
index 25ab944e2..64ad53938 100644
--- a/src/main/res/values-sr/strings.xml
+++ b/src/main/res/values-sr/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Обриши поруке</string>
<string name="also_end_conversation">Окончај ову преписку након тога</string>
<string name="choose_presence">Избор присутности за контакта</string>
- <string name="send_plain_text_message">Пошаљи обичну текстуалну поруку</string>
<string name="send_otr_message">Пошаљи ОТР шифровану поруку</string>
<string name="send_omemo_message">Пошаљи ОМЕМО шифровану поруку</string>
<string name="send_pgp_message">Пошаљи ОпенПГП шифровану поруку</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">Сервер не подржава регистрацију</string>
<string name="account_status_security_error">Безбедносна грешка</string>
<string name="account_status_incompatible_server">Некомпатибилан сервер</string>
- <string name="encryption_choice_none">Обичан текст</string>
<string name="encryption_choice_otr">ОТР</string>
<string name="encryption_choice_pgp">ОпенПГП</string>
<string name="encryption_choice_omemo">ОМЕМО</string>
diff --git a/src/main/res/values-sv/strings.xml b/src/main/res/values-sv/strings.xml
index 90ca685c8..faa12a924 100644
--- a/src/main/res/values-sv/strings.xml
+++ b/src/main/res/values-sv/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">Ta bort meddelanden</string>
<string name="also_end_conversation">Avsluta sedan denna konversation</string>
<string name="choose_presence">Välj tillgänglighet till kontakt</string>
- <string name="send_plain_text_message">Skicka meddelande i klartext</string>
<string name="send_otr_message">Skicka OTR-krypterat meddelande</string>
<string name="send_omemo_message">Skicka OMEMO-krypterat meddelande</string>
<string name="send_pgp_message">Skicka OpenPGP-krypterat meddelande</string>
@@ -150,7 +149,6 @@
<string name="account_status_regis_not_sup">Servern stödjer inte registrering</string>
<string name="account_status_security_error">Säkerhetsfel</string>
<string name="account_status_incompatible_server">Inkompatibel server</string>
- <string name="encryption_choice_none">Klartext</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml
index 7803f5b27..de8751c51 100644
--- a/src/main/res/values-zh-rCN/strings.xml
+++ b/src/main/res/values-zh-rCN/strings.xml
@@ -76,7 +76,6 @@
<string name="delete_messages">删除消息</string>
<string name="also_end_conversation">之后结束该会话</string>
<string name="choose_presence">添加在线用户至联系人</string>
- <string name="send_plain_text_message">发送纯文本信息</string>
<string name="send_otr_message">发送 OTR 加密信息</string>
<string name="send_pgp_message">发送 OpenPGP 加密信息</string>
<string name="your_nick_has_been_changed">昵称修改成功</string>
@@ -147,7 +146,6 @@
<string name="account_status_regis_not_sup">服务器不支持注册</string>
<string name="account_status_security_error">安全错误</string>
<string name="account_status_incompatible_server">服务器不兼容</string>
- <string name="encryption_choice_none">纯文本内容</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">编辑账号</string>
diff --git a/src/main/res/values-zh-rTW/strings.xml b/src/main/res/values-zh-rTW/strings.xml
index 8a4d3539e..495e427fd 100644
--- a/src/main/res/values-zh-rTW/strings.xml
+++ b/src/main/res/values-zh-rTW/strings.xml
@@ -60,7 +60,6 @@
<string name="delete_messages">刪除訊息</string>
<string name="also_end_conversation">之後結束這對話</string>
<string name="choose_presence">選擇狀態訊息</string>
- <string name="send_plain_text_message">發送純文字訊息</string>
<string name="send_otr_message">發送 OTR 加密訊息</string>
<string name="send_pgp_message">發送 OpenPGP 加密訊息</string>
<string name="your_nick_has_been_changed">用戶名稱修改成功</string>
@@ -129,7 +128,6 @@
<string name="account_status_regis_conflict">該用戶名稱已被使用</string>
<string name="account_status_regis_success">註冊完成</string>
<string name="account_status_regis_not_sup">伺服器不支持註冊</string>
- <string name="encryption_choice_none">純文字內容</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="mgmt_account_edit">編輯帳戶</string>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 185494bc3..b6551db4c 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -78,7 +78,7 @@
<string name="delete_messages">Delete messages</string>
<string name="also_end_conversation">End this conversations afterwards</string>
<string name="choose_presence">Choose presence to contact</string>
- <string name="send_plain_text_message">Send plain text message</string>
+ <string name="send_unencrypted_message">Send unencrypted message</string>
<string name="send_otr_message">Send OTR encrypted message</string>
<string name="send_omemo_message">Send OMEMO encrypted message</string>
<string name="send_pgp_message">Send OpenPGP encrypted message</string>
@@ -152,7 +152,7 @@
<string name="account_status_regis_not_sup">Server does not support registration</string>
<string name="account_status_security_error">Security error</string>
<string name="account_status_incompatible_server">Incompatible server</string>
- <string name="encryption_choice_none">Plain text</string>
+ <string name="encryption_choice_unencrypted">Unencrypted</string>
<string name="encryption_choice_otr">OTR</string>
<string name="encryption_choice_pgp">OpenPGP</string>
<string name="encryption_choice_omemo">OMEMO</string>
@@ -512,4 +512,6 @@
<string name="download_failed_file_not_found">Download failed: File not found</string>
<string name="download_failed_could_not_connect">Download failed: Could not connect to host</string>
<string name="elv_undo">undo</string>
+ <string name="pref_use_white_background">Use white background</string>
+ <string name="pref_use_white_background_summary">Show received messages as black text on a white background</string>
</resources>
diff --git a/src/main/res/xml/preferences.xml b/src/main/res/xml/preferences.xml
index a0968b45b..7b976967c 100644
--- a/src/main/res/xml/preferences.xml
+++ b/src/main/res/xml/preferences.xml
@@ -97,6 +97,11 @@
android:title="@string/pref_conference_name"/>
<CheckBoxPreference
android:defaultValue="false"
+ android:key="use_white_background"
+ android:title="@string/pref_use_white_background"
+ android:summary="@string/pref_use_white_background_summary"/>
+ <CheckBoxPreference
+ android:defaultValue="false"
android:key="use_larger_font"
android:summary="@string/pref_use_larger_font_summary"
android:title="@string/pref_use_larger_font"/>