mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 06:51:55 +03:00
Fixed crash in test of files downloading / uploading
This commit is contained in:
parent
a1a31b68d9
commit
35b25f04eb
2 changed files with 2 additions and 0 deletions
|
@ -198,6 +198,7 @@ public class FileDownloader extends Service implements OnDatatransferProgressLis
|
||||||
* @param file A file that could be in the queue of downloads.
|
* @param file A file that could be in the queue of downloads.
|
||||||
*/
|
*/
|
||||||
public boolean isDownloading(Account account, OCFile file) {
|
public boolean isDownloading(Account account, OCFile file) {
|
||||||
|
if (account == null || file == null) return false;
|
||||||
String targetKey = buildRemoteName(account, file);
|
String targetKey = buildRemoteName(account, file);
|
||||||
synchronized (mPendingDownloads) {
|
synchronized (mPendingDownloads) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
|
|
|
@ -324,6 +324,7 @@ public class FileUploader extends Service implements OnDatatransferProgressListe
|
||||||
* @param file A file that could be in the queue of pending uploads
|
* @param file A file that could be in the queue of pending uploads
|
||||||
*/
|
*/
|
||||||
public boolean isUploading(Account account, OCFile file) {
|
public boolean isUploading(Account account, OCFile file) {
|
||||||
|
if (account == null || file == null) return false;
|
||||||
String targetKey = buildRemoteName(account, file);
|
String targetKey = buildRemoteName(account, file);
|
||||||
synchronized (mPendingUploads) {
|
synchronized (mPendingUploads) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
|
|
Loading…
Reference in a new issue