image provider path name now with .webp ending

This commit is contained in:
iNPUTmice 2014-06-04 22:35:08 +02:00
parent 83e919f8af
commit 9a448f822f
2 changed files with 6 additions and 3 deletions

View File

@ -36,7 +36,9 @@ public class ImageProvider extends ContentProvider {
throw new FileNotFoundException(); throw new FileNotFoundException();
} }
String conversationUuid = uuidsSplited[1]; String conversationUuid = uuidsSplited[1];
String messageUuid = uuidsSplited[2]; String messageUuid = uuidsSplited[2].split("\\.")[0];
Log.d("xmppService","messageUuid="+messageUuid);
Conversation conversation = databaseBackend Conversation conversation = databaseBackend
.findConversationByUuid(conversationUuid); .findConversationByUuid(conversationUuid);
@ -113,7 +115,8 @@ public class ImageProvider extends ContentProvider {
.parse("content://eu.siacs.conversations.images/" .parse("content://eu.siacs.conversations.images/"
+ message.getConversationUuid() + message.getConversationUuid()
+ "/" + "/"
+ message.getUuid()); + message.getUuid()
+ ".webp");
} }
public static Uri getIncomingContentUri() { public static Uri getIncomingContentUri() {

View File

@ -342,7 +342,7 @@ public class ConversationFragment extends Fragment {
Intent shareIntent = new Intent(); Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND); shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, ImageProvider.getContentUri(message)); shareIntent.putExtra(Intent.EXTRA_STREAM, ImageProvider.getContentUri(message));
shareIntent.setType("image/*"); shareIntent.setType("image/webp");
startActivity(Intent.createChooser(shareIntent, getText(R.string.share_with))); startActivity(Intent.createChooser(shareIntent, getText(R.string.share_with)));
return true; return true;
} }