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