aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-13 15:40:59 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-13 15:40:59 +0200
commita8010e71335daab3dfc3d6d523fd51755c9d6427 (patch)
treed9c650a7d247cc268e07293677b44a3f7e5fa179 /src
parent6dfd885d3428dbf7e4869f883f4424624cbe3da3 (diff)
parent84e79040df5cae9f1c32e7a8055d8fd4b0dce531 (diff)
Merge branch 'development' into feature/take_picture
Diffstat (limited to 'src')
-rw-r--r--src/eu/siacs/conversations/services/ImageProvider.java8
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java10
2 files changed, 10 insertions, 8 deletions
diff --git a/src/eu/siacs/conversations/services/ImageProvider.java b/src/eu/siacs/conversations/services/ImageProvider.java
index c1bae661..7ca57032 100644
--- a/src/eu/siacs/conversations/services/ImageProvider.java
+++ b/src/eu/siacs/conversations/services/ImageProvider.java
@@ -93,5 +93,13 @@ public class ImageProvider extends ContentProvider {
public int update(Uri arg0, ContentValues arg1, String arg2, String[] arg3) {
return 0;
}
+
+ public static Uri getContentUri(Message message) {
+ return Uri
+ .parse("content://eu.siacs.conversations.images/"
+ + message.getConversationUuid()
+ + "/"
+ + message.getUuid());
+ }
}
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 91a39ecc..8d29ce8b 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -16,6 +16,7 @@ import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
import eu.siacs.conversations.entities.MucOptions;
import eu.siacs.conversations.entities.MucOptions.OnRenameListener;
+import eu.siacs.conversations.services.ImageProvider;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.utils.UIHelper;
import eu.siacs.conversations.xmpp.jingle.JingleConnection;
@@ -329,15 +330,8 @@ public class ConversationFragment extends Fragment {
@Override
public void onClick(View v) {
- Uri uri = Uri
- .parse("content://eu.siacs.conversations.images/"
- + message.getConversationUuid()
- + "/"
- + message.getUuid());
- Log.d("xmppService",
- "staring intent with uri:" + uri.toString());
Intent intent = new Intent(Intent.ACTION_VIEW);
- intent.setDataAndType(uri, "image/*");
+ intent.setDataAndType(ImageProvider.getContentUri(message), "image/*");
startActivity(intent);
}
});