Make sure that loading failure is reported to dropbox.

Test: adb shell dumpsys media.extractor
      Check 'ls /data/system/dropbox' after failure
Bug: 131106476
Change-Id: Ib25c762fd8e50bc0637ec903dc691a070e66ce75
gugelfrei
Dongwon Kang 5 years ago
parent 7fc3bbe570
commit bc2d30d07d

@ -19,6 +19,7 @@
#include <utils/Log.h>
#include <android/dlext.h>
#include <android-base/logging.h>
#include <binder/IPCThreadState.h>
#include <binder/PermissionCache.h>
#include <binder/IServiceManager.h>
@ -244,20 +245,17 @@ void MediaExtractorFactory::RegisterExtractors(
void *libHandle = android_dlopen_ext(
libPath.string(),
RTLD_NOW | RTLD_LOCAL, dlextinfo);
if (libHandle) {
GetExtractorDef getDef =
(GetExtractorDef) dlsym(libHandle, "GETEXTRACTORDEF");
if (getDef) {
ALOGV("registering sniffer for %s", libPath.string());
RegisterExtractor(
new ExtractorPlugin(getDef(), libHandle, libPath), pluginList);
} else {
ALOGW("%s does not contain sniffer", libPath.string());
dlclose(libHandle);
}
} else {
ALOGW("couldn't dlopen(%s) %s", libPath.string(), strerror(errno));
}
CHECK(libHandle != nullptr)
<< "couldn't dlopen(" << libPath.string() << ") " << strerror(errno);
GetExtractorDef getDef =
(GetExtractorDef) dlsym(libHandle, "GETEXTRACTORDEF");
CHECK(getDef != nullptr)
<< libPath.string() << " does not contain sniffer";
ALOGV("registering sniffer for %s", libPath.string());
RegisterExtractor(
new ExtractorPlugin(getDef(), libHandle, libPath), pluginList);
}
closedir(libDir);
} else {

Loading…
Cancel
Save