aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-28 03:22:05 +0100
committerDaniel Gultsch <daniel.gultsch@rwth-aachen.de>2014-02-28 03:22:05 +0100
commit03d96266f8bbb76e25610e903d74a0afa7dcd03b (patch)
tree6373b7e74c6130ec4e80665b6781a0c1d4f175b1
parent9581dfcde4720ede5c9fa5ca97210504b6609b3f (diff)
fixed a small graphic glitch
-rw-r--r--res/layout/fragment_conversation.xml12
-rw-r--r--src/de/gultsch/chat/services/XmppConnectionService.java22
2 files changed, 19 insertions, 15 deletions
diff --git a/res/layout/fragment_conversation.xml b/res/layout/fragment_conversation.xml
index 22f783d3..4e0d2030 100644
--- a/res/layout/fragment_conversation.xml
+++ b/res/layout/fragment_conversation.xml
@@ -45,14 +45,16 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/textsend"
- android:layout_below="@+id/info_box"
android:layout_alignParentLeft="true"
+ android:layout_below="@+id/info_box"
android:background="#e5e5e5"
- tools:listitem="@layout/message_sent"
android:divider="@null"
- android:dividerHeight="0dp"
- android:transcriptMode="alwaysScroll"
- android:listSelector="@android:color/transparent">
+ android:dividerHeight="0dp"
+ android:listSelector="@android:color/transparent"
+ android:transcriptMode="alwaysScroll"
+ tools:listitem="@layout/message_sent"
+ android:stackFromBottom="true">
+
</ListView>
<LinearLayout
android:id="@+id/info_box"
diff --git a/src/de/gultsch/chat/services/XmppConnectionService.java b/src/de/gultsch/chat/services/XmppConnectionService.java
index 4e75f7aa..7ff09957 100644
--- a/src/de/gultsch/chat/services/XmppConnectionService.java
+++ b/src/de/gultsch/chat/services/XmppConnectionService.java
@@ -210,16 +210,18 @@ public class XmppConnectionService extends Service {
} else if (show.getContent().equals("dnd")) {
contact.updatePresence(fromParts[1], Presences.DND);
}
- Element x = packet.findChild("x");
- if ((x != null)
- && (x.getAttribute("xmlns").equals("jabber:x:signed"))) {
- try {
- Log.d(LOGTAG,"pgp signature for contact" +packet.getAttribute("from"));
- contact.setPgpKeyId(getPgpEngine().fetchKeyId(packet.findChild("status")
- .getContent(), x.getContent()));
- databaseBackend.updateContact(contact);
- } catch (OpenPgpException e) {
- Log.d(LOGTAG,"faulty pgp. just ignore");
+ PgpEngine pgp = getPgpEngine();
+ if (pgp!=null) {
+ Element x = packet.findChild("x");
+ if ((x != null)
+ && (x.getAttribute("xmlns").equals("jabber:x:signed"))) {
+ try {
+ Log.d(LOGTAG,"pgp signature for contact" +packet.getAttribute("from"));
+ contact.setPgpKeyId(pgp.fetchKeyId(packet.findChild("status")
+ .getContent(), x.getContent()));
+ } catch (OpenPgpException e) {
+ Log.d(LOGTAG,"faulty pgp. just ignore");
+ }
}
}
databaseBackend.updateContact(contact);