Prevent crash when picking file from GoogleDrive

This commit is contained in:
Sylvain Berfini 2018-01-11 11:18:27 +01:00
parent 4c59844e8b
commit 3de26c02ca
2 changed files with 13 additions and 0 deletions

View file

@ -613,6 +613,9 @@ public final class LinphoneUtils {
}
// TODO handle non-primary volumes
}// Docs storage
else if ("com.google.android.apps.docs.storage".equals(uri.getAuthority())) {
//Google doc not supported right now
}
// DownloadsProvider
else if ("com.android.providers.downloads.documents".equals(uri.getAuthority())) {

View file

@ -454,6 +454,11 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
}
private void addFileToPendingList(String path) {
if (path == null) {
Log.e("Can't add file to pending list because it's path is null...");
return;
}
View pendingFile = mInflater.inflate(R.layout.file_upload_cell, mFilesUploadLayout, false);
pendingFile.setTag(path);
@ -480,6 +485,11 @@ public class GroupChatFragment extends Fragment implements ChatRoomListener, Con
}
private void addImageToPendingList(String path) {
if (path == null) {
Log.e("Can't add image to pending list because it's path is null...");
return;
}
View pendingImage = mInflater.inflate(R.layout.image_upload_cell, mFilesUploadLayout, false);
pendingImage.setTag(path);