merge from froyo-plus-aosp

Change-Id: Ibaa84571e3b5a7ea29e55d41f773aa5f301086de
This commit is contained in:
The Android Open Source Project
2010-06-25 11:18:59 -07:00

View File

@@ -1215,8 +1215,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;