Merge "Change in media scanner to set correct date"
This commit is contained in:
@@ -1203,8 +1203,12 @@ public class MediaScanner
|
||||
prescan(path);
|
||||
|
||||
File file = new File(path);
|
||||
|
||||
// lastModified is in milliseconds on Files.
|
||||
long lastModifiedSeconds = file.lastModified() / 1000;
|
||||
|
||||
// always scan the file, so we can return the content://media Uri for existing files
|
||||
return mClient.doScanFile(path, mimeType, file.lastModified(), file.length(), true);
|
||||
return mClient.doScanFile(path, mimeType, lastModifiedSeconds, file.length(), true);
|
||||
} catch (RemoteException e) {
|
||||
Log.e(TAG, "RemoteException in MediaScanner.scanFile()", e);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user