浏览代码

Changes after CR. Added silent error as Toast when error uploading a content uri file appears, or data file is not valid

jabarros 9 年之前
父节点
当前提交
ae63ec12b2
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/com/owncloud/android/ui/activity/FileDisplayActivity.java

+ 4 - 0
src/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -794,10 +794,14 @@ public class FileDisplayActivity extends HookActivity
                     cursor.close();
                     return;
 
+                } else {
+                    Toast.makeText(this, R.string.uploader_error_message_no_file_to_upload,
+                            Toast.LENGTH_SHORT).show();
                 }
                 // and what happens in case of error?; wrong target name for the upload
             } catch (Exception e) {
                 Log_OC.e(TAG, "Error while trying to copy and upload a schema type content file ", e);
+                Toast.makeText(this, R.string.common_error_unknown, Toast.LENGTH_SHORT).show();
             }
         } else {
             remotePath += new File(filePath).getName();