This commit is contained in:
Daniel Gultsch 2014-04-03 14:25:54 +02:00
parent 24d6e8615c
commit 9d2d853e1b
3 changed files with 13 additions and 2 deletions

View File

@ -468,7 +468,11 @@ public class ManageAccountActivity extends XmppActivity {
try {
xmppConnectionService.generatePgpAnnouncement(selectedAccountForActionMode);
} catch (UserInputRequiredException e) {
Log.d("gultsch","already came back. ignoring");
try {
startIntentSenderForResult(e.getPendingIntent().getIntentSender(), REQUEST_ANNOUNCE_PGP, null, 0, 0, 0);
} catch (SendIntentException e1) {
Log.d(LOGTAG,"sending intent failed");
}
}
}
}

View File

@ -583,7 +583,8 @@ public class XmppConnection implements Runnable {
.getContent().split("/")[1];
account.setResource(resource);
if (streamFeatures.hasChild("sm")) {
EnablePacket enable = new EnablePacket();
String xmlns = streamFeatures.findChild("sm").getAttribute("xmlns");
EnablePacket enable = new EnablePacket(xmlns);
tagWriter.writeStanzaAsync(enable);
}
sendInitialPresence();

View File

@ -10,4 +10,10 @@ public class EnablePacket extends AbstractStanza {
this.setAttribute("resume", "true");
}
public EnablePacket(String xmlns) {
super("enable");
this.setAttribute("xmlns",xmlns);
this.setAttribute("resume", "true");
}
}