From 1d458e8ab3db775f74404cc9e58d4ec22cc07010 Mon Sep 17 00:00:00 2001 From: Christian S Date: Sun, 27 Mar 2016 20:02:36 +0200 Subject: Update ShortcutBadger to version 1.1.4 --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/services') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 2159e92e..bf498bc6 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -2809,9 +2809,9 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa if (unreadCount != count) { Log.d(Config.LOGTAG, "update unread count to " + count); if (count > 0) { - ShortcutBadger.with(getApplicationContext()).count(count); + ShortcutBadger.applyCount(getApplicationContext(), count); } else { - ShortcutBadger.with(getApplicationContext()).remove(); + ShortcutBadger.removeCount(getApplicationContext()); } unreadCount = count; } -- cgit v1.2.3 From e074104004fa146611ce39cd32751ab3cd718dd1 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 31 Mar 2016 21:15:49 +0200 Subject: save otr fingerprint in message --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/services') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index bf498bc6..cc0a8f70 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -931,7 +931,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } break; case Message.ENCRYPTION_AXOLOTL: - message.setAxolotlFingerprint(account.getAxolotlService().getOwnFingerprint()); + message.setFingerprint(account.getAxolotlService().getOwnFingerprint()); if (message.needsUploading()) { if (account.httpUploadAvailable() || message.fixCounterpart()) { this.sendFileMessage(message, delay); @@ -977,7 +977,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } break; case Message.ENCRYPTION_AXOLOTL: - message.setAxolotlFingerprint(account.getAxolotlService().getOwnFingerprint()); + message.setFingerprint(account.getAxolotlService().getOwnFingerprint()); break; } } -- cgit v1.2.3 From 74c496fe3ef544d45c94365799c061ddfe898330 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Thu, 31 Mar 2016 21:56:59 +0200 Subject: add methods to check max file size for http upload --- .../java/eu/siacs/conversations/services/XmppConnectionService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/services') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index cc0a8f70..1d7a4600 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -847,8 +847,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa private void sendFileMessage(final Message message, final boolean delay) { Log.d(Config.LOGTAG, "send file message"); final Account account = message.getConversation().getAccount(); - final XmppConnection connection = account.getXmppConnection(); - if (connection != null && connection.getFeatures().httpUpload()) { + if (account.httpUploadAvailable()) { mHttpConnectionManager.createNewUploadConnection(message, delay); } else { mJingleConnectionManager.createNewConnection(message); -- cgit v1.2.3 From 2549ce89b0fac2a41c4de61c42d76e521875717f Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Fri, 1 Apr 2016 00:03:14 +0200 Subject: check max http file size when attaching files --- .../siacs/conversations/services/XmppConnectionService.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/main/java/eu/siacs/conversations/services') diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 1d7a4600..28ac4d19 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -847,7 +847,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa private void sendFileMessage(final Message message, final boolean delay) { Log.d(Config.LOGTAG, "send file message"); final Account account = message.getConversation().getAccount(); - if (account.httpUploadAvailable()) { + if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize())) { mHttpConnectionManager.createNewUploadConnection(message, delay); } else { mJingleConnectionManager.createNewConnection(message); @@ -884,7 +884,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa switch (message.getEncryption()) { case Message.ENCRYPTION_NONE: if (message.needsUploading()) { - if (account.httpUploadAvailable() || message.fixCounterpart()) { + if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize()) + || message.fixCounterpart()) { this.sendFileMessage(message, delay); } else { break; @@ -896,7 +897,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa case Message.ENCRYPTION_PGP: case Message.ENCRYPTION_DECRYPTED: if (message.needsUploading()) { - if (account.httpUploadAvailable() || message.fixCounterpart()) { + if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize()) + || message.fixCounterpart()) { this.sendFileMessage(message, delay); } else { break; @@ -932,7 +934,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa case Message.ENCRYPTION_AXOLOTL: message.setFingerprint(account.getAxolotlService().getOwnFingerprint()); if (message.needsUploading()) { - if (account.httpUploadAvailable() || message.fixCounterpart()) { + if (account.httpUploadAvailable(fileBackend.getFile(message,false).getSize()) + || message.fixCounterpart()) { this.sendFileMessage(message, delay); } else { break; -- cgit v1.2.3