mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
do not use media scanner
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
d066d2d42c
commit
56c7fb4949
1 changed files with 2 additions and 1 deletions
|
@ -31,6 +31,7 @@ import android.content.Intent;
|
|||
import android.content.OperationApplicationException;
|
||||
import android.database.Cursor;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.RemoteException;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
|
@ -1735,7 +1736,7 @@ public class FileDataStorageManager {
|
|||
}
|
||||
|
||||
public static void triggerMediaScan(String path) {
|
||||
if (path != null) {
|
||||
if (path != null && Build.VERSION.SDK_INT < Build.VERSION_CODES.Q) {
|
||||
Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
|
||||
intent.setData(Uri.fromFile(new File(path)));
|
||||
MainApp.getAppContext().sendBroadcast(intent);
|
||||
|
|
Loading…
Reference in a new issue