Use libtextsecure 1.2.2

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2015-03-10 18:59:12 -07:00
parent c1fe585ffb
commit 41fadc3437
3 changed files with 11 additions and 10 deletions

View File

@@ -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);

View File

@@ -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();