Fixed camera captured image sending using chat
This commit is contained in:
parent
0b643e27d4
commit
c92722f7ce
1 changed files with 6 additions and 5 deletions
|
@ -338,14 +338,15 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
|
||||||
fileToUploadPath = mImageToUploadUri.getPath();
|
fileToUploadPath = mImageToUploadUri.getPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fileToUploadPath.startsWith("content://") || fileToUploadPath.startsWith("file://")) {
|
||||||
|
fileToUploadPath = LinphoneUtils.getFilePath(getActivity().getApplicationContext(), Uri.parse(fileToUploadPath));
|
||||||
|
} else if (fileToUploadPath.contains("com.android.contacts/contacts/")) {
|
||||||
|
fileToUploadPath = LinphoneUtils.getCVSPathFromLookupUri(fileToUploadPath).toString();
|
||||||
|
}
|
||||||
|
|
||||||
if (LinphoneUtils.isExtensionImage(fileToUploadPath)) {
|
if (LinphoneUtils.isExtensionImage(fileToUploadPath)) {
|
||||||
addImageToPendingList(fileToUploadPath);
|
addImageToPendingList(fileToUploadPath);
|
||||||
} else {
|
} else {
|
||||||
if (fileToUploadPath.startsWith("content://") || fileToUploadPath.startsWith("file://")) {
|
|
||||||
fileToUploadPath = LinphoneUtils.getFilePath(getActivity().getApplicationContext(), Uri.parse(fileToUploadPath));
|
|
||||||
} else if (fileToUploadPath.contains("com.android.contacts/contacts/")) {
|
|
||||||
fileToUploadPath = LinphoneUtils.getCVSPathFromLookupUri(fileToUploadPath).toString();
|
|
||||||
}
|
|
||||||
addFileToPendingList(fileToUploadPath);
|
addFileToPendingList(fileToUploadPath);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue