Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bc2d30d0 authored by Dongwon Kang's avatar Dongwon Kang
Browse files

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
parent 7fc3bbe5
Loading
Loading
Loading
Loading
+12 −14
Original line number Diff line number Diff line
@@ -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) {
            CHECK(libHandle != nullptr)
                    << "couldn't dlopen(" << libPath.string() << ") " << strerror(errno);

            GetExtractorDef getDef =
                (GetExtractorDef) dlsym(libHandle, "GETEXTRACTORDEF");
                if (getDef) {
            CHECK(getDef != nullptr)
                    << libPath.string() << " does not contain sniffer";

            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));
            }
        }
        closedir(libDir);
    } else {