15 Commits

Author SHA1 Message Date
Steve Block
71f2cf116a Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865

Bug: 5449033
Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
2011-10-26 09:57:54 +01:00
Guang Zhu
973f553be4 Make MediaScanner skip certain directories
The list of directories to skip are configurable via setprop.
The main motivation is that some test data folder takes long time
to scan, and media scanner may compete for CPU time against perf
tests therefore skewing the results.

Bug: 5263115
Change-Id: I568213e2a4babf6033021c1d336ef0347c0e3315
2011-09-09 15:36:42 -07:00
Jeff Brown
2c70d4a372 Untangle MediaScanner error handling.
Bug: 5056917

Change-Id: I1a7a73579e3ba4e9709459329fc1901a28b0f4b1
2011-07-20 17:33:13 -07:00
Dianne Hackborn
d86302df0e Quiet the log.
Change-Id: Ie814b579997bb555eae014c22da0f41f1a46940f
2011-06-09 17:37:00 -07:00
Mike Lockwood
71b3342a58 DO NOT MERGE MediaScanner: Fix bug in "no media" handling logic
Don't let the "no media" status of one directory leak to the remaining files
and directories in the same parent.

Bug: 4364077

Change-Id: Ie756ccd06b1962b06143fc02a1a3927c3aba143a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:57 -04:00
Mike Lockwood
9c112a86de DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding files from the media provider
Previously we ignored any files and directories that had name started with '.'
and ignored any directories that contained a ".nomedia" file.
Now to support transferring any file via MTP, we now add these previously ignored files
to the media database, but will not mark them as audio, video, image or playlist files.
That way they will be included in the files table but will be hidden from the
audio, video, images and playlist views that are used by apps like Music and Gallery.

Bug: 3405327

Change-Id: Ibb37bb2856a0684ce9f685ed565ad35347622834
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-05-03 21:03:56 -04:00
Mike Lockwood
076e05b488 MediaScanner: Add support for scanning empty directories
Currently the media scanner does not create database entries for directories
unless they contain a file that is scanned.
Fixing this so we provide a consistent view of the world to MTP.

Change-Id: Ia776acfeae23192183e7192d63cdc34d830ea889
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-16 15:35:36 -08:00
Mike Lockwood
c37255d5d0 Media scanner support for tracking files of arbitrary type.
The native media scanner no longer filters files based on file extension.
Audio, video, image and playlist files are handled as before, but non-media
files are now inserted into the "files" table, which was originally added
to support MTP.

Change-Id: I9053218fb6d2671a3bb181405c34442b94678afc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-12 23:21:44 -04:00
Mike Lockwood
5a23f8c41e Fixes for simulator build on lucid
strchr and strrchr now return const char* instead of char*

Change-Id: I5ca831b8951af7e6306eb9d9d6f78ed2ec13d649
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-07-15 15:02:52 -04:00
Andreas Huber
230f5c1cfb am 03e90f7e: am 58e9402b: Merge "Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cpp" into gingerbread
Merge commit '03e90f7eeb032c981fc2952aa33f6ba1fae20d97'

* commit '03e90f7eeb032c981fc2952aa33f6ba1fae20d97':
  Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cpp
2010-06-23 13:23:24 -07:00
Andreas Huber
fb41d59595 Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cpp
Change-Id: I863651619f84b2b66e9a926ce1fef8ce6a53a42d
related-to-bug: 2639116
2010-06-23 11:33:43 -07:00
Mike Lockwood
f30218bea7 MediaScanner: Fix handling of files with dirent.d_type == DT_UNKNOWN
The previous code was calling stat() on the parent directory rather than the actual file.

Change-Id: If64552cb37552c77618a81ae4333307a018efe13
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-06-14 22:57:22 -07:00
Kenny Root
a8c02d77e4 Fix regression in directory scanning
Previous range-checking fix removed an inequality check. This change
restores it.

Offending change was I5eb310ced58c3c64a7af2d11b80326efe5adbcab

Change-Id: Ic952c3ba5a4f7e5ab2148ec623b6f083cb7495fb
2010-03-15 21:17:40 -07:00
Kenny Root
7fe4fe68fa Range check in MediaScanner::processDirectory
Make sure we don't have an empty string before checking if it's a
directory since this string is tainted.

Change-Id: I5eb310ced58c3c64a7af2d11b80326efe5adbcab
2010-02-18 09:26:47 -08:00
Andreas Huber
bfb9fb143b Refactor MediaScanner. Some steps on the way towards being able to build the tree without OpenCore. 2009-12-03 13:21:54 -08:00