9 Commits

Author SHA1 Message Date
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