summaryrefslogtreecommitdiffstats
path: root/media/libmedia/MediaScannerClient.cpp
diff options
context:
space:
mode:
authorJeff Brown <jeffbrown@google.com>2011-07-20 16:38:43 -0700
committerJeff Brown <jeffbrown@google.com>2011-07-20 17:33:13 -0700
commit7188e55f54a43c55fd6b96454720c447f1dc454e (patch)
treece77a06ad12fc66ce180fdbf882c011393d472d9 /media/libmedia/MediaScannerClient.cpp
parent50d42da58a88dcdb082cff079766af71c0871470 (diff)
downloadframeworks_av-7188e55f54a43c55fd6b96454720c447f1dc454e.zip
frameworks_av-7188e55f54a43c55fd6b96454720c447f1dc454e.tar.gz
frameworks_av-7188e55f54a43c55fd6b96454720c447f1dc454e.tar.bz2
Untangle MediaScanner error handling.
Bug: 5056917 Change-Id: I1a7a73579e3ba4e9709459329fc1901a28b0f4b1
Diffstat (limited to 'media/libmedia/MediaScannerClient.cpp')
-rw-r--r--media/libmedia/MediaScannerClient.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libmedia/MediaScannerClient.cpp b/media/libmedia/MediaScannerClient.cpp
index bd3596e..7a7aeb6 100644
--- a/media/libmedia/MediaScannerClient.cpp
+++ b/media/libmedia/MediaScannerClient.cpp
@@ -62,7 +62,7 @@ void MediaScannerClient::beginFile()
mValues = new StringArray;
}
-bool MediaScannerClient::addStringTag(const char* name, const char* value)
+status_t MediaScannerClient::addStringTag(const char* name, const char* value)
{
if (mLocaleEncoding != kEncodingNone) {
// don't bother caching strings that are all ASCII.
@@ -212,8 +212,10 @@ void MediaScannerClient::endFile()
// finally, push all name/value pairs to the client
for (int i = 0; i < mNames->size(); i++) {
- if (!handleStringTag(mNames->getEntry(i), mValues->getEntry(i)))
+ status_t status = handleStringTag(mNames->getEntry(i), mValues->getEntry(i));
+ if (status) {
break;
+ }
}
}
// else addStringTag() has done all the work so we have nothing to do