projects
/
pub
/
Android
/
ownCloud.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of https://github.com/owncloud/android into material_buttons
[pub/Android/ownCloud.git]
/
src
/
com
/
owncloud
/
android
/
services
/
observer
/
FileObserverService.java
diff --git
a/src/com/owncloud/android/services/observer/FileObserverService.java
b/src/com/owncloud/android/services/observer/FileObserverService.java
index
fb9df7c
..
83de450
100644
(file)
--- a/
src/com/owncloud/android/services/observer/FileObserverService.java
+++ b/
src/com/owncloud/android/services/observer/FileObserverService.java
@@
-1,6
+1,9
@@
-/* ownCloud Android client application
+/**
+ * ownCloud Android client application
+ *
+ * @author David A. Velasco
* Copyright (C) 2012 Bartek Przybylski
* Copyright (C) 2012 Bartek Przybylski
- * Copyright (C) 201
2-2014
ownCloud Inc.
+ * Copyright (C) 201
5
ownCloud Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
@@
-30,12
+33,10
@@
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
import android.content.Intent;
import android.content.IntentFilter;
import android.database.Cursor;
-import android.media.MediaScannerConnection;
import android.os.IBinder;
import com.owncloud.android.MainApp;
import com.owncloud.android.authentication.AccountUtils;
import android.os.IBinder;
import com.owncloud.android.MainApp;
import com.owncloud.android.authentication.AccountUtils;
-import com.owncloud.android.datamodel.FileDataStorageManager;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
import com.owncloud.android.files.services.FileDownloader;
import com.owncloud.android.datamodel.OCFile;
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
import com.owncloud.android.files.services.FileDownloader;
@@
-56,8
+57,6
@@
import com.owncloud.android.utils.FileStorageUtils;
* memory. To minimize the impact of this, the service always returns
* Service.START_STICKY, and the later restart of the service is explicitly
* considered in {@link FileObserverService#onStartCommand(Intent, int, int)}.
* memory. To minimize the impact of this, the service always returns
* Service.START_STICKY, and the later restart of the service is explicitly
* considered in {@link FileObserverService#onStartCommand(Intent, int, int)}.
- *
- * @author David A. Velasco
*/
public class FileObserverService extends Service {
*/
public class FileObserverService extends Service {
@@
-353,7
+352,7
@@
public class FileObserverService extends Service {
Log_OC.d(TAG, "Received broadcast intent " + intent);
File downloadedFile = new File(intent.getStringExtra(FileDownloader.EXTRA_FILE_PATH));
Log_OC.d(TAG, "Received broadcast intent " + intent);
File downloadedFile = new File(intent.getStringExtra(FileDownloader.EXTRA_FILE_PATH));
- String parentPath = downloadedFile.getParent();
+ String parentPath = downloadedFile.getParent();
FolderObserver observer = mFolderObserversMap.get(parentPath);
if (observer != null) {
if (intent.getAction().equals(FileDownloader.getDownloadFinishMessage())
FolderObserver observer = mFolderObserversMap.get(parentPath);
if (observer != null) {
if (intent.getAction().equals(FileDownloader.getDownloadFinishMessage())
@@
-369,13
+368,6
@@
public class FileObserverService extends Service {
}
} else {
}
} else {
-
- if (downloadedFile.exists()){
- Log_OC.d("mediaScan", "mediaScan : " + downloadedFile.getAbsolutePath());
- MediaScannerConnection.scanFile(getApplicationContext(),
- new String[]{downloadedFile.getAbsolutePath()}, null, null);
- }
-
Log_OC.d(TAG, "No observer for path " + downloadedFile.getAbsolutePath());
}
}
Log_OC.d(TAG, "No observer for path " + downloadedFile.getAbsolutePath());
}
}