mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
If path is not set or empty do not run any media scanner
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
cfb44f6b83
commit
e6a7d124fc
1 changed files with 2 additions and 2 deletions
|
@ -1718,10 +1718,10 @@ public class FileDataStorageManager {
|
|||
}
|
||||
|
||||
public static void triggerMediaScan(String path, OCFile file) {
|
||||
if (path != null) {
|
||||
if (path != null && !TextUtils.isEmpty(path)) {
|
||||
ContentValues values = new ContentValues();
|
||||
ContentResolver contentResolver = MainApp.getAppContext().getContentResolver();
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && !TextUtils.isEmpty(path)) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q ) {
|
||||
if (file != null) {
|
||||
values.put(MediaStore.Images.Media.MIME_TYPE, file.getMimeType());
|
||||
values.put(MediaStore.Images.Media.TITLE, file.getFileName());
|
||||
|
|
Loading…
Reference in a new issue