From 41fadc3437fc148eb63ced2699904a876521e5b5 Mon Sep 17 00:00:00 2001 From: Moxie Marlinspike Date: Tue, 10 Mar 2015 18:59:12 -0700 Subject: [PATCH] Use libtextsecure 1.2.2 // FREEBIE --- build.gradle | 14 +++++++------- .../securesms/jobs/PushDecryptJob.java | 3 +-- .../securesms/service/MessageRetrievalService.java | 4 +++- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/build.gradle b/build.gradle index e613595e2b..6871bf364e 100644 --- a/build.gradle +++ b/build.gradle @@ -57,7 +57,7 @@ dependencies { compile 'org.whispersystems:jobmanager:0.10.0' compile 'org.whispersystems:libpastelog:1.0.4' - compile 'org.whispersystems:textsecure-android:1.1.0' + compile 'org.whispersystems:textsecure-android:1.2.2' androidTestCompile 'com.google.dexmaker:dexmaker:1.2' androidTestCompile 'com.google.dexmaker:dexmaker-mockito:1.2' @@ -96,23 +96,23 @@ dependencyVerification { 'com.madgag.spongycastle:prov:b8c3fec3a59aac1aa04ccf4dad7179351e54ef7672f53f508151b614c131398a', 'org.whispersystems:jobmanager:01f35586c43aa3806f1c18d3d6a5a972def98103ba1a5a9ca3eec08d15f974b7', 'org.whispersystems:libpastelog:3ccf00fe1597eb8ca1e5de99b17fc225387a1b80b5bbc00ec1bc4d4f3ea9cdde', - 'org.whispersystems:textsecure-android:d2a8630a796222459163effba01456a322f6f15a63668393fb1203f89180a21a', + 'org.whispersystems:textsecure-android:a5e81ff87a4f531ea4997b9a18437fa5d2679e846a4b9b0b1d85371d77189e44', 'com.android.support:support-annotations:fdee2354787ef66b268e75958de3f7f6c4f8f325510a6dac9f49c929f83a63de', 'com.nineoldandroids:library:68025a14e3e7673d6ad2f95e4b46d78d7d068343aa99256b686fe59de1b3163a', 'javax.inject:javax.inject:91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff', 'com.madgag.spongycastle:core:8d6240b974b0aca4d3da9c7dd44d42339d8a374358aca5fc98e50a995764511f', - 'org.whispersystems:axolotl-android:68e81fcb2d54626925574740263b8c2501e96f557dabedeeba7fa414deccef99', - 'org.whispersystems:textsecure-java:f552a3cfee5ba111057c700cbe5208a4c7fe31488d17ddf49f01dd974026b00d', - 'org.whispersystems:axolotl-java:4af04115903cbc5581b32ce82d0518a704dd039f48138d26eb518fa3a2bfee91', - 'org.whispersystems:curve25519-android:3c29a4131a69b0d16baaa3d707678deb39602c3a3ffd75805ce7f9db252e5d0d', + 'org.whispersystems:textsecure-java:d961309064dbf999ed09b336b220d5f2f4d5048a3bd4b2aee93b62726a0289d7', + 'org.whispersystems:axolotl-android:40d3db5004a84749a73f68d2f0d01b2ae35a73c54df96d8c6c6723b96efb6fc0', 'com.googlecode.libphonenumber:libphonenumber:eba17eae81dd622ea89a00a3a8c025b2f25d342e0d9644c5b62e16f15687c3ab', 'com.google.protobuf:protobuf-java:e0c1c64575c005601725e7c6a02cebf9e1285e888f756b2a1d73ffa8d725cc74', 'com.squareup.okhttp:okhttp:89b7f63e2e5b6c410266abc14f50fe52ea8d2d8a57260829e499b1cd9f0e61af', 'com.fasterxml.jackson.core:jackson-databind:835097bcdd11f5bc8a08378c70d4c8054dfa4b911691cc2752063c75534d198d', - 'org.whispersystems:curve25519-java:9ccef8f5aba05d9942336f023c589d6278b4f9135bdc34a7bade1f4e7ad65fa3', + 'org.whispersystems:axolotl-java:6daee739b89d8d7101de6d98f77132fee48495c6ea647d880e77def842f999ea', + 'org.whispersystems:curve25519-android:3c29a4131a69b0d16baaa3d707678deb39602c3a3ffd75805ce7f9db252e5d0d', 'com.squareup.okio:okio:5e1098bd3fdee4c3347f5ab815b40ba851e4ab1b348c5e49a5b0362f0ce6e978', 'com.fasterxml.jackson.core:jackson-annotations:0ca408c24202a7626ec8b861e99d85eca5e38b73311dd6dd12e3e9deecc3fe94', 'com.fasterxml.jackson.core:jackson-core:cbf4604784b4de226262845447a1ad3bb38a6728cebe86562e2c5afada8be2c0', + 'org.whispersystems:curve25519-java:9ccef8f5aba05d9942336f023c589d6278b4f9135bdc34a7bade1f4e7ad65fa3', 'com.android.support:support-v4:703572d3015a088cc5604b7e38885af3d307c829d0c5ceaf8654ff41c71cd160', ] } diff --git a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java index ee971d9e3d..e2ae57908f 100644 --- a/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java +++ b/src/org/thoughtcrime/securesms/jobs/PushDecryptJob.java @@ -99,9 +99,8 @@ public class PushDecryptJob extends MasterSecretJob { private void handleMessage(MasterSecret masterSecret, TextSecureEnvelope envelope, long smsMessageId) { try { - int deviceId = envelope.getSourceDevice(); AxolotlStore axolotlStore = new TextSecureAxolotlStore(context, masterSecret); - TextSecureCipher cipher = new TextSecureCipher(axolotlStore, new AxolotlAddress(envelope.getSource(), deviceId)); + TextSecureCipher cipher = new TextSecureCipher(axolotlStore); TextSecureMessage message = cipher.decrypt(envelope); diff --git a/src/org/thoughtcrime/securesms/service/MessageRetrievalService.java b/src/org/thoughtcrime/securesms/service/MessageRetrievalService.java index 5d866f9cd5..60c761c45c 100644 --- a/src/org/thoughtcrime/securesms/service/MessageRetrievalService.java +++ b/src/org/thoughtcrime/securesms/service/MessageRetrievalService.java @@ -138,7 +138,9 @@ public class MessageRetrievalService extends Service implements Runnable, Inject } private synchronized boolean isConnectionNecessary() { - Log.w(TAG, "Network requirement: " + networkRequirement.isPresent()); + Log.w(TAG, String.format("Network requirement: %s, active activities: %s, push pending: %s", + networkRequirement.isPresent(), activeActivities, pushPending)); + return TextSecurePreferences.isWebsocketRegistered(this) && (activeActivities > 0 || pushPending) && networkRequirement.isPresent();