Loading media/libmediaplayerservice/Crypto.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,6 @@ void Crypto::findFactoryForScheme(const uint8_t uuid[16]) { return; } ALOGE("Failed to find crypto plugin"); mInitCheck = ERROR_UNSUPPORTED; } Loading @@ -151,6 +150,7 @@ bool Crypto::loadLibraryForScheme(const String8 &path, const uint8_t uuid[16]) { if (!mLibrary.get()) { mLibrary = new SharedLibrary(path); if (!*mLibrary) { ALOGE("loadLibraryForScheme failed:%s", mLibrary->lastError()); return false; } Loading @@ -165,6 +165,7 @@ bool Crypto::loadLibraryForScheme(const String8 &path, const uint8_t uuid[16]) { if (createCryptoFactory == NULL || (mFactory = createCryptoFactory()) == NULL || !mFactory->isCryptoSchemeSupported(uuid)) { ALOGE("createCryptoFactory failed:%s", mLibrary->lastError()); closeFactory(); return false; } Loading media/libmediaplayerservice/SharedLibrary.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -46,4 +46,10 @@ namespace android { } return dlsym(mLibHandle, symbol); } const char *SharedLibrary::lastError() const { const char *error = dlerror(); return error ? error : "No errors or unknown error"; } }; media/libmediaplayerservice/SharedLibrary.h +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ namespace android { bool operator!() const; void *lookup(const char *symbol) const; const char *lastError() const; private: void *mLibHandle; Loading Loading
media/libmediaplayerservice/Crypto.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -134,7 +134,6 @@ void Crypto::findFactoryForScheme(const uint8_t uuid[16]) { return; } ALOGE("Failed to find crypto plugin"); mInitCheck = ERROR_UNSUPPORTED; } Loading @@ -151,6 +150,7 @@ bool Crypto::loadLibraryForScheme(const String8 &path, const uint8_t uuid[16]) { if (!mLibrary.get()) { mLibrary = new SharedLibrary(path); if (!*mLibrary) { ALOGE("loadLibraryForScheme failed:%s", mLibrary->lastError()); return false; } Loading @@ -165,6 +165,7 @@ bool Crypto::loadLibraryForScheme(const String8 &path, const uint8_t uuid[16]) { if (createCryptoFactory == NULL || (mFactory = createCryptoFactory()) == NULL || !mFactory->isCryptoSchemeSupported(uuid)) { ALOGE("createCryptoFactory failed:%s", mLibrary->lastError()); closeFactory(); return false; } Loading
media/libmediaplayerservice/SharedLibrary.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -46,4 +46,10 @@ namespace android { } return dlsym(mLibHandle, symbol); } const char *SharedLibrary::lastError() const { const char *error = dlerror(); return error ? error : "No errors or unknown error"; } };
media/libmediaplayerservice/SharedLibrary.h +1 −0 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ namespace android { bool operator!() const; void *lookup(const char *symbol) const; const char *lastError() const; private: void *mLibHandle; Loading