Merge "Ensure we compute display name when needed" into jb-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
08b3090848
@@ -523,6 +523,13 @@ public class MediaScanner
|
|||||||
try {
|
try {
|
||||||
FileEntry entry = beginFile(path, mimeType, lastModified,
|
FileEntry entry = beginFile(path, mimeType, lastModified,
|
||||||
fileSize, isDirectory, noMedia);
|
fileSize, isDirectory, noMedia);
|
||||||
|
|
||||||
|
// if this file was just inserted via mtp, set the rowid to zero
|
||||||
|
// (even though it already exists in the database), to trigger
|
||||||
|
// the correct code path for updating its entry
|
||||||
|
if (mMtpObjectHandle != 0) {
|
||||||
|
entry.mRowId = 0;
|
||||||
|
}
|
||||||
// rescan for metadata if file was modified since last scan
|
// rescan for metadata if file was modified since last scan
|
||||||
if (entry != null && (entry.mLastModifiedChanged || scanAlways)) {
|
if (entry != null && (entry.mLastModifiedChanged || scanAlways)) {
|
||||||
if (noMedia) {
|
if (noMedia) {
|
||||||
|
|||||||
Reference in New Issue
Block a user