+ /**
+ * Checks if content provider, using the content:// scheme, returns a file with mime-type
+ * 'application/pdf' but file has not extension
+ * @param localPath Full path to a file in the local file system.
+ * @param mimeType MIME type of the file.
+ * @return true if is needed to add the pdf file extension to the file
+ *
+ * TODO - move to OCFile or Utils class
+ */
+ private boolean isPdfFileFromContentProviderWithoutExtension(String localPath,
+ String mimeType) {
+ return localPath.startsWith(UriUtils.URI_CONTENT_SCHEME) &&
+ mimeType.equals(MIME_TYPE_PDF) &&
+ !localPath.endsWith(FILE_EXTENSION_PDF);
+ }
+
+ /**
+ * Remove uploads of an account
+ *
+ * @param account Downloads account to remove
+ */
+ private void cancelUploadsForAccount(Account account){
+ // Cancel pending uploads
+ mPendingUploads.remove(account);
+ }