Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 893e2b62 authored by Romain Guy's avatar Romain Guy Committed by Android Code Review
Browse files

Merge "Change in media scanner to set correct date"

parents 879becf5 ec74abb7
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -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;