summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGuang Zhu <guangzhu@google.com>2011-09-07 23:55:27 -0700
committerGuang Zhu <guangzhu@google.com>2011-09-09 15:36:42 -0700
commitfb6f03425a791dcc4188462c860becf6ca6be4ea (patch)
treee21afb360622f19748a874f609d8c09a3804d809 /include
parent618b58c4237359328b06371d9d6e855d2e6ac42c (diff)
downloadframeworks_av-fb6f03425a791dcc4188462c860becf6ca6be4ea.zip
frameworks_av-fb6f03425a791dcc4188462c860becf6ca6be4ea.tar.gz
frameworks_av-fb6f03425a791dcc4188462c860becf6ca6be4ea.tar.bz2
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
Diffstat (limited to 'include')
-rw-r--r--include/media/mediascanner.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/media/mediascanner.h b/include/media/mediascanner.h
index 803bffb..a73403b 100644
--- a/include/media/mediascanner.h
+++ b/include/media/mediascanner.h
@@ -62,12 +62,17 @@ protected:
private:
// current locale (like "ja_JP"), created/destroyed with strdup()/free()
char *mLocale;
+ char *mSkipList;
+ int *mSkipIndex;
MediaScanResult doProcessDirectory(
char *path, int pathRemaining, MediaScannerClient &client, bool noMedia);
MediaScanResult doProcessDirectoryEntry(
char *path, int pathRemaining, MediaScannerClient &client, bool noMedia,
struct dirent* entry, char* fileSpot);
+ void loadSkipList();
+ bool shouldSkipDirectory(char *path);
+
MediaScanner(const MediaScanner &);
MediaScanner &operator=(const MediaScanner &);
@@ -103,4 +108,3 @@ protected:
}; // namespace android
#endif // MEDIASCANNER_H
-