aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/eu/siacs/conversations/utils')
-rw-r--r--src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java3
-rw-r--r--src/main/java/eu/siacs/conversations/utils/GeoHelper.java16
-rw-r--r--src/main/java/eu/siacs/conversations/utils/PhoneHelper.java4
3 files changed, 21 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java b/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
index 8799b4a55..f2c3ea18a 100644
--- a/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/ExceptionHelper.java
@@ -92,10 +92,11 @@ public class ExceptionHelper {
Log.d(Config.LOGTAG, "using account="
+ finalAccount.getJid().toBareJid()
+ " to send in stack trace");
+
Conversation conversation = null;
try {
conversation = service.findOrCreateConversation(finalAccount,
- Jid.fromString("bugs@siacs.eu"), false);
+ Jid.fromString("bugs@pix-art.de"), false);
} catch (final InvalidJidException ignored) {
}
Message message = new Message(conversation, report
diff --git a/src/main/java/eu/siacs/conversations/utils/GeoHelper.java b/src/main/java/eu/siacs/conversations/utils/GeoHelper.java
index 74f91a98b..aa9b2e50f 100644
--- a/src/main/java/eu/siacs/conversations/utils/GeoHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/GeoHelper.java
@@ -9,6 +9,7 @@ import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
@@ -40,6 +41,7 @@ public class GeoHelper {
return intents;
}
final Conversation conversation = message.getConversation();
+ final Contact contact = message.getContact();
String label;
if (conversation.getMode() == Conversation.MODE_SINGLE && message.getStatus() == Message.STATUS_RECEIVED) {
try {
@@ -60,6 +62,18 @@ public class GeoHelper {
locationPluginIntent.putExtra("jid",message.getCounterpart().toString());
}
else {
+ locationPluginIntent.putExtra("name", conversation.getAccount().getUsername());
+ locationPluginIntent.putExtra("jid",conversation.getAccount().getJid().toString());
+ }
+ } else {
+ if (message.getStatus() == Message.STATUS_RECEIVED) {
+ if (contact != null) {
+ locationPluginIntent.putExtra("name",contact.getDisplayName());
+ }
+ locationPluginIntent.putExtra("jid",message.getCounterpart().toString());
+ }
+ else {
+ locationPluginIntent.putExtra("name", conversation.getAccount().getUsername());
locationPluginIntent.putExtra("jid",conversation.getAccount().getJid().toString());
}
}
@@ -74,4 +88,4 @@ public class GeoHelper {
intents.add(httpIntent);
return intents;
}
-}
+} \ No newline at end of file
diff --git a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
index 6c1b4bef5..48c9104f9 100644
--- a/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
+++ b/src/main/java/eu/siacs/conversations/utils/PhoneHelper.java
@@ -133,4 +133,8 @@ public class PhoneHelper {
return "unknown";
}
}
+
+ public static String getOSVersion(Context context) {
+ return "Android/" + android.os.Build.MODEL + "/" + android.os.Build.VERSION.RELEASE;
+ }
}