Add notification for key change event.

Fixes #1460
This commit is contained in:
agrajaghh 2014-05-13 23:29:50 +02:00 committed by Moxie Marlinspike
parent 9b82411c3d
commit 8713a85beb

View File

@ -126,8 +126,10 @@ public class PushReceiver {
String encoded = Base64.encodeBytes(message.getBody());
IncomingTextMessage textMessage = new IncomingTextMessage(message, encoded, null);
IncomingPreKeyBundleMessage bundleMessage = new IncomingPreKeyBundleMessage(textMessage, encoded);
EncryptingSmsDatabase database = DatabaseFactory.getEncryptingSmsDatabase(context);
Pair<Long, Long> messageAndThreadId = database.insertMessageInbox(masterSecret, bundleMessage);
DatabaseFactory.getEncryptingSmsDatabase(context).insertMessageInbox(masterSecret, bundleMessage);
MessageNotifier.updateNotification(context, masterSecret, messageAndThreadId.second);
}
} catch (InvalidKeyException e) {
Log.w("PushReceiver", e);